summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-11-13 19:26:13 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-11-13 19:26:13 +0300
commit9bd894254dab122ce83ca25770faeb9c371f2326 (patch)
treee4906823e5146f4e5ee3e473ab448e705900ff9a /protocols
parent5705290d6bdf964202620575266dba7ae552234a (diff)
Twitter: we don't ignore twits from unknown contacts, but rather mark them as temporary
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Twitter/src/connection.cpp6
-rw-r--r--protocols/Twitter/src/stdafx.h1
-rw-r--r--protocols/Twitter/src/version.h2
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 <m_button.h>
#include <m_chat_int.h>
#include <m_clistint.h>
+#include <m_contacts.h>
#include <m_database.h>
#include <m_folders.h>
#include <m_history.h>
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 <stdver.h>