summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-03-01 13:31:22 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-03-01 13:31:22 +0300
commit8570b398cd7f852f5dc3e363717827f8981dc6fe (patch)
tree1e33e4c5552d0d0aec79f8f6d615b4a22c56844b /protocols
parent3002f81adb3cc000220ae1dde5fc817ef4046da8 (diff)
Twitter tries to pass ANSI nick instead of UTF8
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Twitter/src/chat.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/protocols/Twitter/src/chat.cpp b/protocols/Twitter/src/chat.cpp
index 6c268dbfa6..7fe8b4f667 100644
--- a/protocols/Twitter/src/chat.cpp
+++ b/protocols/Twitter/src/chat.cpp
@@ -131,18 +131,9 @@ void CTwitterProto::SetChatStatus(int status)
if (isChatRoom(hContact))
continue;
- DBVARIANT uid, nick;
- if (getString(hContact, TWITTER_KEY_UN, &uid))
- continue;
-
- if (!db_get_s(hContact, "CList", "MyHandle", &nick)) {
- AddChatContact(uid.pszVal, nick.pszVal);
- db_free(&nick);
- }
- else
- AddChatContact(uid.pszVal);
-
- db_free(&uid);
+ ptrA uid(getUStringA(hContact, TWITTER_KEY_UN)), nick(db_get_utfa(hContact, "CList", "MyHandle"));
+ if (uid)
+ AddChatContact(uid, nick);
}
// For some reason, I have to send an INITDONE message, even if I'm not actually