TReKiE / msnp-sharp

Automatically exported from code.google.com/p/msnp-sharp
0 stars 0 forks source link

Nameserver.ContactStatusChanged event not thrown #89

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Put a breakpoint on the Nameserver_ContactStatusChanged method
2. Connect with the official Live Messenger Client
3. Then, connect with msnp-sharp, using the same account

What is the expected output? What do you see instead?
Usually, we we are signed in, we receive the event for every online 
contacts.
If we are already loged in with another client, the event is never thrown, 
even if the contacts change their status later

What version of the product are you using? On what operating system?
2.5.4, Windows Vista

Original issue reported on code.google.com by adh...@gmail.com on 18 Feb 2009 at 11:20

GoogleCodeExporter commented 9 years ago

Original comment by freezing...@gmail.com on 18 Mar 2009 at 5:41

GoogleCodeExporter commented 9 years ago
Ok here is the deal.

Lets say we have user joe@camel.com and joe@camel.com is logged-in to the 
official
MSN client and his status is "available/online".

Now, if joe@camel.com logs into MSN with the MSNPSharp then he will not get 
receive
any events. The MSN server will send events, and given priority to the official 
MSN
client.

Now if joe@camel.com is logged-in to the official MSN client and his status is 
NOT
"available/online":

Now, if joe@camel.com logs into MSN with the MSNPSharp then the official MSN 
client
will force a logout of joe@camel.com and MSNPSharp will receive events.

Here is the code to fix:

        messenger.Nameserver.SignedIn += new EventHandler<EventArgs>(SignedInHandler);

        /// <summary>
        /// The callback routine associated with a successful messenger.Connect().
        /// Called immediatly after the user is logged-in to MSN.
        /// </summary>
        /// <param name="sender">The object that produced the event</param>
        /// <param name="e">Event args</param>
        private void SignedInHandler(object sender, EventArgs e)
        {
            TraceMessage("SignedInHandler");
            if (messenger.Owner.Status == PresenceStatus.Online)
            {
                // send error message to UI.
                //the MSN User is already online somewhere else.
                messenger.Disconnect();
            }
            else
            {
            ...
            }
        }

Original comment by johnpaul...@gmail.com on 25 Mar 2009 at 6:04

GoogleCodeExporter commented 9 years ago
thats not what he ment,

he is saying that if someones in you contactslist that is connected with the 
off. 
client changes his status(away/busy/luch ect.) it doesnt throw a event. same 
counts 
for ppl that go offline btw, atleast it gets stuck sometimes in my client.

Original comment by mitch.al...@gmail.com on 25 May 2009 at 2:02

GoogleCodeExporter commented 9 years ago

Original comment by freezing...@gmail.com on 5 Jul 2009 at 5:41

GoogleCodeExporter commented 9 years ago
Fixed. r1202.

Original comment by hepha...@gmail.com on 26 Aug 2009 at 1:56