[Adium-commits] adium 2019:59d25d4df621: Sort of the patch from '''tuttle''' to ...

adium-commits at adiumx.com adium-commits at adiumx.com
Tue Apr 28 16:11:15 UTC 2009


details:	http://hg.adiumx.com/adium/rev/59d25d4df621
revision:	2019:59d25d4df621
author:		Zachary West <zacw at adiumx.com>
date:		Tue Apr 28 12:11:08 2009 -0400

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.

diffstat:

 Source/AIURLHandlerPlugin.m |  22 ++++++++++------------
 1 files changed, 10 insertions(+), 12 deletions(-)

diffs (40 lines):

diff -r c0f142ff6f98 -r 59d25d4df621 Source/AIURLHandlerPlugin.m
--- a/Source/AIURLHandlerPlugin.m	Tue Apr 28 11:56:39 2009 -0400
+++ b/Source/AIURLHandlerPlugin.m	Tue Apr 28 12:11:08 2009 -0400
@@ -390,10 +390,8 @@
 				// xmpp:johndoe at jabber.org?remove
 				// xmpp:johndoe at jabber.org?unsubscribe
 				
-			} else if (([query caseInsensitiveCompare:@"join"] == NSOrderedSame) &&
-					   ([scheme caseInsensitiveCompare:@"xmpp"] == NSOrderedSame)) {
+			} else if ([query rangeOfString:@"join"].location == 0) {
 				NSString *password = [[url queryArgumentForKey:@"password"] stringByDecodingURLEscapes];
-				//TODO: password support: xmpp:darkcave at macbeth.shakespeare.lit?join;password=cauldronburn
 				
 				[self _openXMPPGroupChat:[url user]
 								onServer:[url host]
@@ -529,15 +527,15 @@
 	}
 	
 	if (name && account) {
-		[adium.chatController chatWithName:name
-		 identifier:nil
-		 onAccount:account
-		 chatCreationInfo:[NSDictionary dictionaryWithObjectsAndKeys:
-						   name, @"room",
-						   server, @"server",
-						   account.formattedUID, @"handle",
-						   password, @"password", /* may be nil, so should be last */
-						   nil]];
+		[adium.chatController chatWithName:[NSString stringWithFormat:@"%@@%@", name, server]
+								identifier:nil
+								 onAccount:account
+						  chatCreationInfo:[NSDictionary dictionaryWithObjectsAndKeys:
+											name, @"room",
+											server, @"server",
+											account.formattedUID, @"handle",
+											password, @"password", /* may be nil, so should be last */
+											nil]];
 	} else {
 		NSBeep();
 	}




More information about the commits mailing list