GoogleCodeArchive / msnp-sharp

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

SbMessageHandler #175

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have fixed some bugs.
1. Unable to cast sbMessageHandler to YIMMessageHandler in class
nsMessageHandler.

FROM:
 foreach (YIMMessageHandlerYimHandler in P2PHandler.SwitchboardSessions)
                            {
                                    if
(YimHandler.Contacts.ContainsKey(ContactList.GetContact(sender,
ClientType.EmailMember)))
                                    {
                                        return;  //The handler have been
registered, return.
                                    }

                            }
INTO:

 foreach (SBMessageHandler YimHandler in P2PHandler.SwitchboardSessions)
                            {
                                if (YimHandler is YIMMessageHandler)
                                {
                                    if
(YimHandler.Contacts.ContainsKey(ContactList.GetContact(sender,
ClientType.EmailMember)))
                                    {
                                        return;  //The handler have been
registered, return.
                                    }
                                }

                            }

This is occured when we received IM from MSN First and then from YM. If we
received IM From YM first and then MSN. Nothing error is occured.

2. When sending typing message to YM User. The error is
unable to cast MSNPSharp.Contact To System.String() in Class
YIMMessageHandler. I Have Fixed It with the code below :

 YIMMessage nsMessage = new YIMMessage("UUM",
                new string[] { ((Contact)(iemu.Current)).Mail  , 
                ((int)ClientType.EmailMember).ToString(), 
                ((uint)TextMessageType.Typing).ToString()},
                NSMessageHandler.Credentials.MsnProtocol);

3. When we chat with two different ym user. and one of them sending
message. The TextMessageReceived Event Fired Twice. And i haven't fixed this.

Original issue reported on code.google.com by ptvegat...@gmail.com on 17 Jan 2010 at 1:31

GoogleCodeExporter commented 9 years ago
It seems that you're using a very old version, all these issues had been fixed 
in 
r1440. But thanks anyway.

Original comment by freezing...@gmail.com on 17 Jan 2010 at 2:32