diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-26 19:57:16 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-26 19:57:16 +0300 |
commit | 58f6699f46e31048a0ec475a41d472b2120a78c7 (patch) | |
tree | a368fd83b2a830398a5780ce13dae34fa69d2647 /protocols/SkypeWeb/src | |
parent | 0f00ad85feaa2fdef2c38f385cfe6ae5e46b8b05 (diff) |
more fixes related to #1827 - now the core checks unique user ids itself
Diffstat (limited to 'protocols/SkypeWeb/src')
-rw-r--r-- | protocols/SkypeWeb/src/skype_chatrooms.cpp | 24 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.h | 2 |
2 files changed, 1 insertions, 25 deletions
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 = "");
|