adium-1.4 3325:9f091fa22d79: Fix xmpp:-urls without a user part ...
commits at adium.im
commits at adium.im
Tue Jan 4 20:42:05 UTC 2011
details: http://hg.adium.im/adium-1.4/rev/9f091fa22d79
revision: 3325:9f091fa22d79
author: Thijs Alkemade <thijsalkemade at gmail.com>
date: Tue Jan 04 21:41:50 2011 +0100
Fix xmpp:-urls without a user part opening chats with (null)@...
Fixes #14908
diffs (26 lines):
diff -r 0b6d7fec9b58 -r 9f091fa22d79 Source/AIURLHandlerPlugin.m
--- a/Source/AIURLHandlerPlugin.m Tue Dec 28 15:42:36 2010 -0800
+++ b/Source/AIURLHandlerPlugin.m Tue Jan 04 21:41:50 2011 +0100
@@ -369,11 +369,19 @@
} else if ([scheme isEqualToString:@"xmpp"]) {
if ([query rangeOfString:@"message"].location == 0) {
//xmpp:johndoe at jabber.org?message;subject=Subject;body=Body
+ //xmpp:jabber.org?message;subject=Subject;body=Body
NSString *msg = [[url queryArgumentForKey:@"body"] stringByDecodingURLEscapes];
- [self _openChatToContactWithName:[NSString stringWithFormat:@"%@@%@", [url user], [url host]]
- onService:serviceID
- withMessage:msg];
+ if ([url user]) {
+ [self _openChatToContactWithName:[NSString stringWithFormat:@"%@@%@", [url user], [url host]]
+ onService:serviceID
+ withMessage:msg];
+ } else {
+ [self _openChatToContactWithName:[url host]
+ onService:serviceID
+ withMessage:msg];
+
+ }
} else if ([query rangeOfString:@"roster"].location == 0
|| [query rangeOfString:@"subscribe"].location == 0) {
//xmpp:johndoe at jabber.org?roster;name=John%20Doe;group=Friends
More information about the commits
mailing list