From 58f6699f46e31048a0ec475a41d472b2120a78c7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 Feb 2019 19:57:16 +0300 Subject: more fixes related to #1827 - now the core checks unique user ids itself --- protocols/SkypeWeb/src/skype_chatrooms.cpp | 24 +----------------------- protocols/SkypeWeb/src/skype_proto.h | 2 -- 2 files changed, 1 insertion(+), 25 deletions(-) (limited to 'protocols/SkypeWeb') diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp index 44ee84166b..7965447c9b 100644 --- a/protocols/SkypeWeb/src/skype_chatrooms.cpp +++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp @@ -389,8 +389,7 @@ void CSkypeProto::OnGetChatInfo(const NETLIBHTTPREQUEST *response, void *p) CMStringA username(UrlToSkypename(member["userLink"].as_string().c_str())); std::string role = member["role"].as_string(); - if (!IsChatContact(chatId, username)) - AddChatContact(chatId, username, username, role.c_str(), true); + AddChatContact(chatId, username, username, role.c_str(), true); } PushRequest(new GetHistoryRequest(chatId, 15, true, 0, li), &CSkypeProto::OnGetServerHistory); } @@ -412,24 +411,6 @@ void CSkypeProto::ChangeChatTopic(const char *chat_id, const char *topic, const Chat_Event(&gce); } -bool CSkypeProto::IsChatContact(const char *chat_id, const char *id) -{ - ptrA users(GetChatUsers(chat_id)); - return (users != NULL && strstr(users, id) != nullptr); -} - -char* CSkypeProto::GetChatUsers(const char *chat_id) -{ - Utf2T id(chat_id); - - GC_INFO gci = { 0 }; - gci.Flags = GCF_USERS; - gci.pszModule = m_szModuleName; - gci.pszID = id; - Chat_GetInfo(&gci); - return gci.pszUsers; -} - char* CSkypeProto::GetChatContactNick(const char *chat_id, const char *id, const char *name) { // Check if there is custom nick for this chat contact @@ -465,9 +446,6 @@ char* CSkypeProto::GetChatContactNick(const char *chat_id, const char *id, const void CSkypeProto::AddChatContact(const char *chat_id, const char *id, const char *name, const char *role, bool isChange) { - if (IsChatContact(chat_id, id)) - return; - ptrA szNick(GetChatContactNick(chat_id, id, name)); GCEVENT gce = { m_szModuleName, chat_id, GC_EVENT_JOIN }; diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index 3ca8336a1b..cdf53ac492 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -325,8 +325,6 @@ private: void OnChatEvent(const JSONNode &node); void OnSendChatMessage(const char *chat_id, const wchar_t *tszMessage); - char* GetChatUsers(const char *chat_id); - bool IsChatContact(const char *chat_id, const char *id); void AddMessageToChat(const char *chat_id, const char *from, const char *content, bool isAction, int emoteOffset, time_t timestamp, bool isLoading = false); void AddChatContact(const char *chat_id, const char *id, const char *name, const char *role, bool isChange = false); void RemoveChatContact(const char *chat_id, const char *id, const char *name, bool isKick = false, const char *initiator = ""); -- cgit v1.2.3