Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/majn/telegram-purple.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormjentsch <mtthsjntsch@gmail.com>2015-12-17 00:37:53 +0300
committermjentsch <mtthsjntsch@gmail.com>2015-12-17 00:37:53 +0300
commitccf28caa8cd573f0fa787f49b9d7c07022ce2770 (patch)
tree89ca09d54c558f2dfc5fb34bd73d2e117a3173ef /telegram-adium
parentde17ccb982bf5cab38ca1b15ccdc7071a29b5ce5 (diff)
Adium: Fix adding contacts with non-ascii names to buddy list
Diffstat (limited to 'telegram-adium')
-rw-r--r--telegram-adium/TelegramAccount.m13
-rw-r--r--telegram-adium/TelegramJoinChatView.xib2
2 files changed, 14 insertions, 1 deletions
diff --git a/telegram-adium/TelegramAccount.m b/telegram-adium/TelegramAccount.m
index 60ba0c6..21fa14a 100644
--- a/telegram-adium/TelegramAccount.m
+++ b/telegram-adium/TelegramAccount.m
@@ -103,6 +103,19 @@
intValue]);
}
+/**!
+ * @brief Returns the name passed to new_purple_buddy, when adding a new contact
+ *
+ * This function is called when creating a new contact from the purple GUI.
+ */
+- (NSString *)_UIDForAddingObject:(AIListContact *)object
+{
+ // The contact UID in Adium was encoded with decomposoed unicode codepoints (see http://unicode.org/reports/tr15/).
+ // Since libtgl and libpurple (and apparently the rest of the world) encode with composed code points, the name
+ // needs to be converted to the composed format to prevent inequality in binary string comparison.
+ return [object.UID precomposedStringWithCanonicalMapping];
+}
+
#pragma mark Action Menu
-(NSMenu*)actionMenuForChat:(AIChat*)chat
{
diff --git a/telegram-adium/TelegramJoinChatView.xib b/telegram-adium/TelegramJoinChatView.xib
index c328f33..5790daa 100644
--- a/telegram-adium/TelegramJoinChatView.xib
+++ b/telegram-adium/TelegramJoinChatView.xib
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9060" systemVersion="15C50" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9060"/>