diff options
author | George Hazan <ghazan@miranda.im> | 2021-01-21 13:44:14 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-01-21 13:44:14 +0300 |
commit | 5f81d39808b16e87386e6cfa1777821aee727c5f (patch) | |
tree | 3c23429cfdbd168cf4379148393f34c1ae0c7a94 /protocols/Steam | |
parent | 0e633c114c470052b31ba9b4893ead2ee7ce51e5 (diff) |
Steam: misprint fix + minor code cleaning
Diffstat (limited to 'protocols/Steam')
-rw-r--r-- | protocols/Steam/src/steam_messages.cpp | 9 | ||||
-rw-r--r-- | protocols/Steam/src/steam_polling.cpp | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/protocols/Steam/src/steam_messages.cpp b/protocols/Steam/src/steam_messages.cpp index c4d9329761..deeb610a4b 100644 --- a/protocols/Steam/src/steam_messages.cpp +++ b/protocols/Steam/src/steam_messages.cpp @@ -35,12 +35,9 @@ void CSteamProto::OnMessageSent(const HttpResponse &response, void *arg) if (node)
error = node.as_string();
- const JSONNode &time = root["utc_timestamp"];
- if (time) {
- timestamp = atol(node.as_string().c_str());
- if (timestamp > getDword(param->hContact, DB_KEY_LASTMSGTS))
- setDword(param->hContact, DB_KEY_LASTMSGTS, timestamp);
- }
+ timestamp = atol(root["utc_timestamp"].as_string().c_str());
+ if (timestamp > getDword(param->hContact, DB_KEY_LASTMSGTS))
+ setDword(param->hContact, DB_KEY_LASTMSGTS, timestamp);
}
if (mir_strcmpi(error.c_str(), "OK") != 0) {
diff --git a/protocols/Steam/src/steam_polling.cpp b/protocols/Steam/src/steam_polling.cpp index e98341b1fd..4e921adf2c 100644 --- a/protocols/Steam/src/steam_polling.cpp +++ b/protocols/Steam/src/steam_polling.cpp @@ -63,7 +63,7 @@ void CSteamProto::ParsePollData(const JSONNode &data) continue; } - if (type == "saytext" || type =="emote") { + if (type == "saytext" || type == "emote") { json_string text = item["text"].as_string(); PROTORECVEVENT recv = { 0 }; |