From 7cb1539b0dbcf585472dd2341129adf174bb0bb5 Mon Sep 17 00:00:00 2001 From: aunsane Date: Sun, 14 Jan 2018 22:02:44 +0300 Subject: Steam: refactoring pt.2 --- protocols/Steam/src/steam_history.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'protocols/Steam/src/steam_history.cpp') diff --git a/protocols/Steam/src/steam_history.cpp b/protocols/Steam/src/steam_history.cpp index a897037bae..a7f0d22e61 100644 --- a/protocols/Steam/src/steam_history.cpp +++ b/protocols/Steam/src/steam_history.cpp @@ -54,7 +54,7 @@ void CSteamProto::OnGotHistoryMessages(const JSONNode &root, void *arg) JSONNode message = messages[i - 1]; long long accountId = _wtoi64(message["accountid"].as_mstring()); - const char *authorSteamId = AccountIdToSteamId(accountId); + const char *steamId = AccountIdToSteamId(accountId); json_string text = message["message"].as_string(); @@ -68,13 +68,11 @@ void CSteamProto::OnGotHistoryMessages(const JSONNode &root, void *arg) recv.timestamp = timestamp; recv.szMessage = (char*)text.c_str(); - MCONTACT hContact = FindContact(cSteamId); + MCONTACT hContact = GetContact(cSteamId); if (!hContact) return; - // Self SteamID - ptrA steamId(getStringA("SteamID")); - if (strcmp(steamId, authorSteamId)) + if (IsMe(steamId)) { // Received message ProtoChainRecvMsg(hContact, &recv); -- cgit v1.2.3