From 8570b398cd7f852f5dc3e363717827f8981dc6fe Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 1 Mar 2021 13:31:22 +0300 Subject: Twitter tries to pass ANSI nick instead of UTF8 --- protocols/Twitter/src/chat.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'protocols/Twitter/src') 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 -- cgit v1.2.3