Adium

Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#6541 closed enhancement (fixed)

Patch to add (some) support for xmpp: URIs

Reported by: mdippery Owned by: nobody
Milestone: Adium X 1.1 Component: Adium Core
Version: Severity: normal
Keywords: jabber, xmpp, URI, link Cc: patches@…
Patch Status: Accepted

Description

This patch relates to discussion in the forum post Auto add new account. It adds some support for xmpp: links, as specified in XEP-0147. The specific additions are:

  1. An addition to AIURLAdditions that parses the query component of xmpp: URIs, which have a slightly different syntax that the URLs already supported in AIURLAddtions. New method is fully documented.
  2. Adds some support for xmpp: protocol URIs. Currently, I could only get message, roster, and subscribe URIs to work; remove and unsubscribe URIs are non-functional. I'm still working on that support. (To make it a long story, I'm trying to figure out a way to remove contacts as though the user had selected a name in the contact list and removed it through the GUI, so the user is prompted before it is removed.) However, I figured that message, add roster item, and subscribe support was more important and a lot cooler.

Patch is attached.

Attachments (2)

xmpp.diff (4.6 KB) - added by Michael Dippery 13 years ago.
Patch file for described enhancements
xmpp-new.diff (4.7 KB) - added by Michael Dippery 13 years ago.
New patch: Tweaks AIURLAdditions to work with semicolons or ampersands in query string.

Download all attachments as: .zip

Change History (14)

Changed 13 years ago by Michael Dippery

Attachment: xmpp.diff added

Patch file for described enhancements

comment:1 Changed 13 years ago by Evan Schoenberg

Milestone: Adium X 1.0.3

comment:2 Changed 13 years ago by Colin Barrett

Michael, I'm wondering if it wouldn't be better to teach queryArgumentsForKey about semicolons? IIRC they are valid as a separator in any url, technically.

I'm kind of surprised that this type of parsing doesn't already exist in NSURL.

comment:3 Changed 13 years ago by Michael Dippery

Wouldn't be a terrible idea. I could look into that and re-submit a patch with that idea in mind.

comment:4 Changed 13 years ago by Colin Barrett

field_haspatch: 10

That'd be awesome, thanks a lot :)

recheck Patch included when you post a new patch.

comment:5 Changed 13 years ago by Michael Dippery

Cc: patches@… added; feedback@… removed
field_haspatch: 01

Tweaked the patch so that -[NSURL(AIURLAdditions) queryArgumentForKey:] can now deal with semicolons or ampersands in the query string.

Changed 13 years ago by Michael Dippery

Attachment: xmpp-new.diff added

New patch: Tweaks AIURLAdditions to work with semicolons or ampersands in query string.

comment:6 Changed 13 years ago by Evan Schoenberg

field_patchstatus: Needs Dev Review

comment:7 Changed 13 years ago by Evan Schoenberg

Patch Status: Needs Dev Review

comment:8 Changed 13 years ago by Eric Richie

Milestone: Adium X 1.0.3Adium X 1.1

comment:9 in reply to:  6 Changed 13 years ago by Evan Schoenberg

Does the new patch supersede the previous one, or are both intended to be applied?

comment:10 Changed 13 years ago by Michael Dippery

New patch supersedes old, only the new patch should be applied.

comment:11 Changed 13 years ago by Evan Schoenberg

Resolution: fixed
Status: newclosed

(In [19357]) Patch from Michael Dippery to add support for a subset of the XMPP links specified in XEP-0147. Good work :) Closes #6541.

comment:12 Changed 12 years ago by Robert

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