From 4c3d77032316bc8814cddc00d020ba00d4533999 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 17 Dec 2024 23:24:44 +0300 Subject: Steam: - contact statuses are back; - contact info is back too; - Miranda's account status is passed to the server; - some old code removed; --- protocols/Steam/src/steam_avatars.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'protocols/Steam/src/steam_avatars.cpp') diff --git a/protocols/Steam/src/steam_avatars.cpp b/protocols/Steam/src/steam_avatars.cpp index 2a7de109ca..022ec914c5 100644 --- a/protocols/Steam/src/steam_avatars.cpp +++ b/protocols/Steam/src/steam_avatars.cpp @@ -23,17 +23,18 @@ bool CSteamProto::GetDbAvatarInfo(PROTO_AVATAR_INFORMATION &pai) return true; } -void CSteamProto::CheckAvatarChange(MCONTACT hContact, std::string avatarUrl) +void CSteamProto::CheckAvatarChange(MCONTACT hContact, const char *avatarHash) { - if (avatarUrl.empty()) - return; - // Check for avatar change - ptrA oldAvatarUrl(getStringA(hContact, "AvatarUrl")); - bool update_required = (!oldAvatarUrl || avatarUrl.compare(oldAvatarUrl)); + ptrA oldAvatarHash(getStringA(hContact, "AvatarHash")); + bool update_required = mir_strcmp(oldAvatarHash, avatarHash) != 0; - if (update_required) - setString(hContact, "AvatarUrl", avatarUrl.c_str()); + if (update_required) { + if (avatarHash) + setString(hContact, "AvatarHash", avatarHash); + else + delSetting(hContact, "AvatarHash"); + } if (!hContact) { PROTO_AVATAR_INFORMATION ai = { 0 }; -- cgit v1.2.3