summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_history.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-12-18 18:41:56 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-12-18 18:41:56 +0300
commitace6bf1bd1e110ac93da464b2b7d75cafef0b415 (patch)
tree15ddd4342f7ed06a9dd8b6a87790b4593cc156ed /protocols/Steam/src/steam_history.cpp
parent920b6b4c19e8ba7b020db7e78db0327b2a742a7b (diff)
obsolete code removed
Diffstat (limited to 'protocols/Steam/src/steam_history.cpp')
-rw-r--r--protocols/Steam/src/steam_history.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/Steam/src/steam_history.cpp b/protocols/Steam/src/steam_history.cpp
index 3b4b3a85b2..bbb1239aa1 100644
--- a/protocols/Steam/src/steam_history.cpp
+++ b/protocols/Steam/src/steam_history.cpp
@@ -8,8 +8,8 @@ void CSteamProto::OnGotConversations(const CFriendsMessagesGetActiveMessageSessi
for (int i=0; i < reply.n_message_sessions; i++) {
auto *session = reply.message_sessions[i];
- const char *who = AccountIdToSteamId(session->accountid_friend);
- MCONTACT hContact = GetContact(who);
+ uint64_t steamId = AccountIdToSteamId(session->accountid_friend);
+ MCONTACT hContact = GetContact(steamId);
if (!hContact)
continue;
@@ -20,7 +20,7 @@ void CSteamProto::OnGotConversations(const CFriendsMessagesGetActiveMessageSessi
time_t lastMessageTS = session->last_message;
if (lastMessageTS > storedMessageTS)
- SendRequest(new GetHistoryMessagesRequest(m_szAccessToken, m_iSteamId, who, storedMessageTS), &CSteamProto::OnGotHistoryMessages, (void*)hContact);
+ SendRequest(new GetHistoryMessagesRequest(m_szAccessToken, m_iSteamId, steamId, storedMessageTS), &CSteamProto::OnGotHistoryMessages, (void*)hContact);
}
}
@@ -39,7 +39,7 @@ void CSteamProto::OnGotHistoryMessages(const JSONNode &root, void *arg)
const JSONNode &message = messages[i - 1];
long long accountId = _wtoi64(message["accountid"].as_mstring());
- const char *steamId = AccountIdToSteamId(accountId);
+ uint64_t steamId = AccountIdToSteamId(accountId);
json_string text = message["message"].as_string();
@@ -53,7 +53,7 @@ void CSteamProto::OnGotHistoryMessages(const JSONNode &root, void *arg)
dbei.timestamp = timestamp;
dbei.pBlob = (char *)text.c_str();
- if (IsMe(steamId))
+ if (steamId == m_iSteamId)
dbei.flags = DBEF_SENT;
RecvMsg(hContact, dbei);