Bug 206852 - Skype provider does not dispatch received message events to listeners
Summary: Skype provider does not dispatch received message events to listeners
Status: RESOLVED FIXED
Alias: None
Product: ECF
Classification: RT
Component: ecf.providers (show other bugs)
Version: 1.0.2   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: ecf.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: greatbug
Depends on:
Blocks:
 
Reported: 2007-10-19 02:56 EDT by tonys CLA
Modified: 2007-10-19 14:38 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tonys CLA 2007-10-19 02:56:42 EDT
Build ID: M20070921-1145

Steps To Reproduce:
1. Open Communications perspective
2. Open an ECF Skype chat but do not send a message
3. Open Skype client on a different machine and send a chat message to the ECF client
4. The incoming message is shown in the Skype client on ECF machine but not echoed in Eclipse

More information:

The problem seems to be that the SkypeProvider ChatManager class only stores a Skype chat in its 'chats' collection in the ChatManager.sendChatMessage method.

So until a message has been sent from the ECF client any incoming messages received prior to a message being sent are discarded by the code in ChatManager.fireChatMessageReceived because the chat associated with the received ChatID is null.
Comment 1 Scott Lewis CLA 2007-10-19 12:07:17 EDT
Thanks for the excellent bug report.

(In reply to comment #0)
> Build ID: M20070921-1145
> 
> Steps To Reproduce:
> 1. Open Communications perspective
> 2. Open an ECF Skype chat but do not send a message
> 3. Open Skype client on a different machine and send a chat message to the ECF
> client
> 4. The incoming message is shown in the Skype client on ECF machine but not
> echoed in Eclipse
> 
> More information:
> 
> The problem seems to be that the SkypeProvider ChatManager class only stores a
> Skype chat in its 'chats' collection in the ChatManager.sendChatMessage method.

Yes.  This is a result of having two UIs (normal skype and ECF skype UI).  I've fixed this problem by changing the code you describe below (in fireChatMessageReceive) to show the message whether the chat was initiated via the ECF client or not.  Does mean that messages will be received in both the skype UI and the ECF UI, but this is probably better.  This fix will be in ECF 1.2 release happening today (10/19/2007).

Please let us know if you disagree with this fix, or have thoughts about alternatives.


Comment 2 tonys CLA 2007-10-19 14:38:10 EDT
(In reply to comment #1)

> Yes.  This is a result of having two UIs (normal skype and ECF skype UI).  I've
> fixed this problem by changing the code you describe below (in
> fireChatMessageReceive) to show the message whether the chat was initiated via
> the ECF client or not.  Does mean that messages will be received in both the
> skype UI and the ECF UI, but this is probably better.  This fix will be in ECF
> 1.2 release happening today (10/19/2007).
> 
> Please let us know if you disagree with this fix, or have thoughts about
> alternatives.

<smile> might have known it wasn't uncomplicated. Thanks for the fast fix - it seems fine to me. I had temporarily patched it in fireChatMessageReceive as follows:

 if (chat == null) 
    { chat = chatMessageReceived.getChat();
      chats.put(chat.getId(),chat);
    }

which works ok for a chatbot but I can see now might have consequences for user interfaces.