Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#11785 closed patch (fixed)

Fix for handling XMPP URIs for joining Multi-User-Chats

Reported by: tuttle Owned by: zacw
Milestone: Adium 1.4 Component: Adium Core
Version: Severity: normal
Keywords: xmpp muc join uri Cc: sven-adium@…
Patch Status: Accepted


This patch fixes several issues with the handling of XMPP URIs for joining Multi-User-Chats. It also fixes #8914.

A "join" URI worked only once

A "join" URI created a chat, but after closing it, the URI didn't work a second time. Reason: The chat was created with just the room name as its name (hidden). The first stanza returning from the MUC server created another chat window with room@server as chat name, which was the effective one. After closing that chat window, the first chat stayed (but still hidden) and prevented the chat to be created again. This patch fixes this behaviour by using room@server as the initial chat name.

additional arguments didn't work

"join" URIs with additional arguments didn't work and resulted in a dead chat window, for example when a password was given like in;password=secret. This is fixed by using [query rangeOfString:@"join"].location == 0 instead of [query caseInsensitiveCompare:@"join"] == NSOrderedSame.

use displayName as default nickname

Before, the formattedUID has been used as the nickname for the chat room, which is awkward. Now the displayName is used, what makes more sense and is also the default in the MUC dialog.

unofficial "nick" argument

Although it's not part of the specification in xep-0045 section 15.7.1, I added the useful "nick" argument, that allows to set the nickname in the chat room. Example:;nick=alice

Attachments (1)

URL.patch (2.7 KB) - added by Sven Anderson 12 years ago.
Patch to fix handling of XMPP MUC join URIs

Download all attachments as: .zip

Change History (9)

Changed 12 years ago by Sven Anderson

Attachment: URL.patch added

Patch to fix handling of XMPP MUC join URIs

comment:1 Changed 12 years ago by David Munch

Is this related to ticket #10497?

comment:2 Changed 12 years ago by Robert

Milestone: Adium 1.3.4
Patch Status: Initially IncludedNeeds Dev Review

Thanks! :)

comment:3 in reply to:  1 Changed 12 years ago by Sven Anderson

Replying to David Munch:

Is this related to ticket #10497?

At least it fixes the URI related problems reported there. But I'm not sure about the whole ticket, since I cannot reproduce the problems there.

comment:4 Changed 11 years ago by Zachary West

Milestone: Adium 1.3.4Adium 1.4
Owner: changed from nobody to Zachary West
Status: newassigned

comment:5 Changed 11 years ago by Jorj Bauer

#10497 is, I believe, fixed - the latest hg 1.4 source (more recent than 1.4hgr2010, which was still not functioning for me) will reconnect a MUC, but *not* if it was initiall connected via XMPP URI.

So, with the latest build:

  1. join a MUC via
  2. disconnect the network; room shows "You have disconnected"
  3. reconnect the network. accounts reconnect, but MUC does not.

Additionally, once in this state, that XMPP URI is unable to re-open the MUC (even if you close the MUC window). But opening it from File => Join Group Chat works correctly, even though XMPP URIs aren't.

comment:6 Changed 11 years ago by Zachary West <zacw@…>

Resolution: fixed
Status: assignedclosed

(In 59d25d4df621) Sort of the patch from tuttle to fix joining XMPP group chats from their URL handler. Fixes #11785.

We were creating two chats, one without the @server.tld suffix, which was confusing us. I am not including the nick-specifying arguments from the patch, since they are nonstandard and potentially confusing.

comment:7 Changed 11 years ago by Zachary West <zacw@…>

(In b2cbb5f7ed13) Missed using the display name for chat handle. Refs #11785.

comment:8 Changed 11 years ago by Robert

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