Project

General

Profile

Bug #244

Messages from other party not received when chat started from Beem

Added by James Blair almost 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XMPP
Target version:
Start date:
02/16/2010
Due date:
% Done:

80%

Estimated time:
Affected version:
hg
Locale:
Close

Description

When I start a chat from Beem, I don't receive messages from the other party, but if the other party starts a chat, it works fine.

To reproduce:

  1. Start Beem and log in
  2. Click on a contact to start a chat
  3. Send a message (the contact will receive this)
  4. Any response from the contact will not show up

I added some debug messages and re-compiled, and I believe this is what is happening:

When a chat is started with Beem, the participant passed to smack is "", with no resource appended. When the user replies, smack starts a new chat with the participant "/resource". Beem strips the resource when it looks up the existing chat, so it knows not to start a new chat. However, the problem is that smack has created two chats, and Beem has only associated its chat object with smack's first chat object (the one created for the outgoing chat with no resource appended).

If, however, the remote user starts the chat, then only one chat object is created (for the incoming message from "/resource") and everything works.

I added a debugging message to BeemChatManager.ChatListener.chatCreated that shows what's going on:

(click on contact in Beem to start chat)
D/BeemChatManager( 1103): Get chat key =
V/BeemChatManager( 1103): chat created locally org.jivesoftware.smack.Chat@437c5090 participant
I/ActivityManager( 570): Displayed activity com.beem.project.beem/.ui.Chat: 284 ms
(remote user sends a message)
V/BeemChatManager( 1103): chat created non-locally org.jivesoftware.smack.Chat@437f7cd0 participant /resource

I tested this with a locally compiled Beem from revision 673, ejabberd, and pidgin.


Related issues

Related to Bug #243: Unable to receive messages after contact logoutClosedFrédéric Barthéléry02/15/2010

Actions

Also available in: Atom PDF