From 9bd894254dab122ce83ca25770faeb9c371f2326 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 13 Nov 2021 19:26:13 +0300 Subject: Twitter: we don't ignore twits from unknown contacts, but rather mark them as temporary --- protocols/Twitter/src/connection.cpp | 6 +++--- protocols/Twitter/src/stdafx.h | 1 + protocols/Twitter/src/version.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp index 6a35d2002b..a8c6651fca 100644 --- a/protocols/Twitter/src/connection.cpp +++ b/protocols/Twitter/src/connection.cpp @@ -502,7 +502,7 @@ void CTwitterProto::UpdateStatuses(bool pre_read, bool popups, bool tweetToMsg) if (!pre_read && in_chat_) UpdateChat(*u); - if (u->username.c_str() == m_szUserName) + if (u->username == m_szUserName.c_str()) continue; MCONTACT hContact = AddToClientList(u->username.c_str(), ""); @@ -560,8 +560,8 @@ void CTwitterProto::UpdateMessages(bool pre_read) std::string sender = msgCreate["sender_id"].as_string(); MCONTACT hContact = FindContactById(sender.c_str()); if (hContact == INVALID_CONTACT_ID) { - debugLogA("Message from unknown sender %s, ignored", sender.c_str()); - continue; + hContact = AddToClientList(sender.c_str(), ""); + Contact_RemoveFromList(hContact); } std::string text = msgCreate["message_data"]["text"].as_string(); diff --git a/protocols/Twitter/src/stdafx.h b/protocols/Twitter/src/stdafx.h index 658303d9be..63b4eecc35 100644 --- a/protocols/Twitter/src/stdafx.h +++ b/protocols/Twitter/src/stdafx.h @@ -31,6 +31,7 @@ using std::map; #include #include #include +#include #include #include #include diff --git a/protocols/Twitter/src/version.h b/protocols/Twitter/src/version.h index 80dfdb562a..61a0406849 100644 --- a/protocols/Twitter/src/version.h +++ b/protocols/Twitter/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 1 #define __MINOR_VERSION 3 #define __RELEASE_NUM 1 -#define __BUILD_NUM 4 +#define __BUILD_NUM 5 #include -- cgit v1.2.3