Adium

Opened 14 years ago

Closed 12 years ago

Last modified 12 years ago

#1880 closed defect (fixed)

Group chats don't reconnect after being disconnected

Reported by: ttimo@idsoftware.com Owned by: nobody
Milestone: Adium 1.2.1 Component: Service/XMPP (Jabber)
Version: Severity: normal
Keywords: WasOn1.5 Cc:
Patch Status: Accepted

Description

if I open a group chat to a jabber server, and let the machine go to sleep, adium will reconnect when coming back from sleep. but the group chat will be unchanged. I can type in and see my own echo, but I'm disconnected.

Attachments (1)

autorejoin.diff (7.7 KB) - added by erik006 12 years ago.
should automatically reconnect the group chats - enumerates through chats, creates a bookmark when a group chat is found, creates new purple chat

Download all attachments as: .zip

Change History (27)

comment:1 Changed 14 years ago by Chris Forsythe

Milestone: Adium X 1.5
Version: 0.85

So to clarify, you want to autojoin open group chats if adium is running with them open when the computer goes to sleep?

comment:2 Changed 14 years ago by ttimo@…

yes. it does reconnect to jabber and other IMs, so it should also reconnect the chats. The current behaviour is very misleading atm as you think you are still online ( you can type and see your messages in the group chat window ), but in reality you are offline.

comment:3 Changed 14 years ago by sarah Ann Schelbred

Having this same problem with AIM-based chat rooms. If the machine goes to sleep or your network connection drops while you're away from it, there is no notification that you have left the chat room. No message is displayed in the console and all chat participants that were in there when it lost connectivity are still listed, so you can sit there and talk to yourself without realizing it. Even a chat error/"you have left chat" notification line in the console on logout/disconnect would be really helpful. Thanks!

comment:4 Changed 14 years ago by avirr

I'm constantly having the same trouble in AIM, it's really really really annoying. One of the few significant flaws in Adium. Please fix ASAP.

comment:5 Changed 13 years ago by Evan Schoenberg

field_haspatch: 0
Summary: jabber group chat doesn't reconnectGroup chats don't reconnect after being disconnected

comment:6 Changed 12 years ago by Ilan Rabinovitch

#5404 seems to cover this same issue, but specifically mentions jabber. Per my comments in #5404, it would be helpful to at least have some sort of error message in the chat window indicating you are disconnected and not actually in the room.

Without such a message there is a no way for a user to tell if they are actually in the room or not. In many cases I will not notice I have been disconnected, and time lengthy messages which appear to be sent to the room. Later I find out I've actually been out of the room and that my messages were lost into the ether.

comment:7 Changed 12 years ago by Lars Eggert

+1 for fixing this. It is really annoying.

Also, as I reported in #7388 (closed, but it is *not* a duplicate of this ticket), it's not even possible to manually rejoin jabber chats with the same handle after a disconnect.

comment:8 Changed 12 years ago by Chris Forsythe

Keywords: WasOn1.5 added
Milestone: Adium X 1.5Good idea for "later"

As the group chat SoC 2007 project completed successfully, we no longer require a group chat milestone. As such, I'm going to move all of these over to Good Idea for "later". Process these normally, reassign as needed to the new 1.x milestones created last night.

comment:9 Changed 12 years ago by Evan Schoenberg

Milestone: Good idea for "later"Adium X 1.2.1
Patch Status: None
pending: 0

This is pretty trivial to implement given the changes made to support bookmarks in 1.2.

comment:10 Changed 12 years ago by erik006

Patch Status: NoneNeeds Dev Review

comment:11 Changed 12 years ago by erik006

This is a bit ugly, the interface actually get closed and re-opened with this patch. However, I don't believe there is a way to do this that looks better right now. Possibly we can replace the chat in a chat container, but that creates the possibility of having a container with no associated chat -> not good.

comment:12 Changed 12 years ago by Evan Schoenberg

Patch Status: Needs Dev ReviewNeeds Changes by Author

Don't be afraid to dig a bit, implementing what you need at any level, to be able to solve things Right. This is a good start; some suggestions:

  • Check the chat's account. Only take action if the chat is on the account which connected.
  • Check whether the chat is open. Only take action if the chat is open.
  • Going through AIListBookmark feels awkward... though not as awkward as closing the chat and reopening it. Here's my thought on a more Complete approach to the problem:
    • You can get the chatCreationDictionary directly from the chat.
    • Then you should write a new AIAccount method rejoinChat:...
    • CBPurpleAccount overrides the method and performs action through SLPurpleCocoaAdapter much like openChat: does, except that it clears the chat identifier before telling it to open.
    • Clearing the chat identifier makes convLookupFromChat() in SLPurpleCocoaAdapter recreate the components hash table and resend the info to serv_join_chat().

(Note: It would sound more straightforward to just clear the identifier in AIChatController before passing it to the account, but it's an account implementation detail that the identifier is used the way it is for Purple accounts. Another AIAccount subclass might expect the identifier to be persistent and take action to rejoin another way.

Hope that helps!

Changed 12 years ago by erik006

Attachment: autorejoin.diff added

should automatically reconnect the group chats - enumerates through chats, creates a bookmark when a group chat is found, creates new purple chat

comment:13 Changed 12 years ago by erik006

Patch Status: Needs Changes by AuthorNeeds Dev Review

comment:14 Changed 12 years ago by erik006

I discovered a problem: when using a global disconnect (using the emd), we don't receive all connection notifications. Although I'm not quite sure why this is.

comment:15 Changed 12 years ago by googelybear

+1 for fixing this. It is really annoying.

comment:16 Changed 12 years ago by fantux

This actually got worse with Adium 1.2. Now it tells you in the chat window that you have been disconnected and then reconnected, however you still get the same behaviour as in the initial posting.

comment:17 Changed 12 years ago by Evan Schoenberg

(In [22158]) Added a note about the ACCOUNT_CONNECTED / ACCOUNT_DISCONNECTED events (and their associated notifications): they are intended to indicate that a particular account connected or disconnected, as they will be aggregated for multiple account connectivity changes in a short period of time. Refs #1880 where erik006 pointed out that this was nonintuitive.

comment:18 Changed 12 years ago by Evan Schoenberg

Resolution: fixed
Status: newclosed

(In [22161]) Based on a patch from Erik Beerepoot, group chats now reconnect after their account has reconnected. "You have disconnected" displays when the account goes offline, but "You have connected" does not display as soon as it comes online; rather, we'll let the joined-chat message indicate this. Fixes #1880

comment:19 Changed 12 years ago by Evan Schoenberg

(In [22162]) Merged [22161]: Based on a patch from Erik Beerepoot, group chats now reconnect after their account has reconnected. "You have disconnected" displays when the account goes offline, but "You have connected" does not display as soon as it comes online; rather, we'll let the joined-chat message indicate this. Fixes #1880

comment:20 Changed 12 years ago by Evan Schoenberg

Milestone: Adium X 1.2.1Adium X 1.2.2

comment:21 Changed 12 years ago by Evan Schoenberg

Milestone: Adium X 1.2.2Adium X 1.2.1

comment:22 Changed 12 years ago by fantux

In 1.2.1b1 this again worsened somewhat. T'is what happens:

  • OSX10.4, MacBook
  • Adium 1.2.1 beta 1
  • go online, join a Jabber-MUC
  • Close the lid, let the computer go to sleep
  • Open the lid, wake the computer
  • Let Adium reconnect

The chat window displays messages from other users all right, but my own messages are not relayed to the MUC. When attempting to manually rejoin the MUC (close chat window, then either 'go to chat' or double-click on the bookmark), nothing happens (no window opens). Further wildly clicking around shows that regular chat does work, while this particular MUC does not (no second MUC around for testing that, unfortunately). Changing the Handle in the 'go to chat'-window does not do any good either.

The only solution so far is to quit and restart Adium.

comment:23 Changed 12 years ago by Evan Schoenberg

Resolution: fixed
Status: closedreopened

Can't believe I didn't test that - I just noted that incoming messages worked.

comment:24 Changed 12 years ago by Evan Schoenberg

Resolution: fixed
Status: reopenedclosed

(In [22373]) Fixed rejoining of chats to properly reassociate AIChat to PurpleConversation and visa versa. Fixes #1880

comment:25 Changed 12 years ago by Evan Schoenberg

(In [22374]) Merged [22373]: Fixed rejoining of chats to properly reassociate AIChat to PurpleConversation and visa versa. Fixes #1880

comment:26 Changed 12 years ago by Robert

Patch Status: Needs Dev ReviewAccepted
Note: See TracTickets for help on using tickets.