adium-1.4 3226:1e9b2eff3984: Patch from brion to distinguish bet...
commits at adium.im
commits at adium.im
Tue Nov 9 01:23:38 UTC 2010
details: http://hg.adium.im/adium-1.4/rev/1e9b2eff3984
revision: 3226:1e9b2eff3984
author: Evan Schoenberg
date: Mon Nov 08 19:17:02 2010 -0600
Patch from brion to distinguish between StatusNet followees in the contact list by using a different group name. Fixes #13604
(transplanted from 82156a7cb3d1e9921751d9e2c8877ef94880665a)
diffs (91 lines):
diff -r e40774a8647e -r 1e9b2eff3984 Plugins/Twitter Plugin/AILaconicaAccount.h
--- a/Plugins/Twitter Plugin/AILaconicaAccount.h Sun Nov 07 20:07:02 2010 -0500
+++ b/Plugins/Twitter Plugin/AILaconicaAccount.h Mon Nov 08 19:17:02 2010 -0600
@@ -19,6 +19,8 @@
#define LACONICA_PREFERENCE_PATH @"Path"
#define LACONICA_PREFERENCE_SSL @"SSL"
#define LACONICA_PREF_GROUP @"Laconica Preferences"
+#define LACONICA_TIMELINE_NAME @"%@ (%@)"
+#define LACONICA_REMOTE_GROUP_NAME @"StatusNet"
@interface AILaconicaAccount : AITwitterAccount {
diff -r e40774a8647e -r 1e9b2eff3984 Plugins/Twitter Plugin/AILaconicaAccount.m
--- a/Plugins/Twitter Plugin/AILaconicaAccount.m Sun Nov 07 20:07:02 2010 -0500
+++ b/Plugins/Twitter Plugin/AILaconicaAccount.m Mon Nov 08 19:17:02 2010 -0600
@@ -205,4 +205,20 @@
return NO;
}
+/*!
+ * @brief The name of our timeline chat
+ */
+- (NSString *)timelineChatName
+{
+ return [NSString stringWithFormat:LACONICA_TIMELINE_NAME, self.host, self.UID];
+}
+
+/*!
+ * @brief The remote group name we'll stuff the timeline into
+ */
+- (NSString *)timelineGroupName
+{
+ return LACONICA_REMOTE_GROUP_NAME;
+}
+
@end
diff -r e40774a8647e -r 1e9b2eff3984 Plugins/Twitter Plugin/AITwitterAccount.h
--- a/Plugins/Twitter Plugin/AITwitterAccount.h Sun Nov 07 20:07:02 2010 -0500
+++ b/Plugins/Twitter Plugin/AITwitterAccount.h Mon Nov 08 19:17:02 2010 -0600
@@ -164,6 +164,7 @@
}
@property (readonly, nonatomic) NSString *timelineChatName;
+ at property (readonly, nonatomic) NSString *timelineGroupName;
@property (readonly, nonatomic) NSString *apiPath;
@property (readonly, nonatomic) NSString *sourceToken;
@property (readonly, nonatomic) NSString *defaultServer;
diff -r e40774a8647e -r 1e9b2eff3984 Plugins/Twitter Plugin/AITwitterAccount.m
--- a/Plugins/Twitter Plugin/AITwitterAccount.m Sun Nov 07 20:07:02 2010 -0500
+++ b/Plugins/Twitter Plugin/AITwitterAccount.m Mon Nov 08 19:17:02 2010 -0600
@@ -222,11 +222,14 @@
[newTimelineChat setDisplayName:self.timelineChatName];
- timelineBookmark = [adium.contactController bookmarkForChat:newTimelineChat inGroup:[adium.contactController groupWithUID:TWITTER_REMOTE_GROUP_NAME]];
+ timelineBookmark = [adium.contactController bookmarkForChat:newTimelineChat
+ inGroup:[adium.contactController groupWithUID:self.timelineGroupName]];
if(!timelineBookmark) {
- AILog(@"%@ Timeline bookmark is nil! Tried checking for existing bookmark for chat name %@, and creating a bookmark for chat %@ in group %@", self.timelineChatName, newTimelineChat, [adium.contactController groupWithUID:TWITTER_REMOTE_GROUP_NAME]);
+ AILog(@"%@ Timeline bookmark is nil! Tried checking for existing bookmark for chat name %@, and creating a bookmark for chat %@ in group %@",
+ self.timelineChatName, newTimelineChat,
+ [adium.contactController groupWithUID:self.timelineGroupName]);
}
}
@@ -819,6 +822,14 @@
}
/*!
+ * @brief The remote group name we'll stuff the timeline into
+ */
+- (NSString *)timelineGroupName
+{
+ return TWITTER_REMOTE_GROUP_NAME;
+}
+
+/*!
* @brief Our timeline chat
*
* If the timeline chat is not already active, it is created.
@@ -2286,7 +2297,7 @@
// If the user isn't in a group, set them in the Twitter group.
if (listContact.countOfRemoteGroupNames == 0) {
- [listContact addRemoteGroupName:TWITTER_REMOTE_GROUP_NAME];
+ [listContact addRemoteGroupName:self.timelineGroupName];
}
// Grab the Twitter display name and set it as the remote alias.
More information about the commits
mailing list