diff options
| author | George Hazan <george.hazan@gmail.com> | 2024-12-17 23:24:44 +0300 |
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2024-12-17 23:24:44 +0300 |
| commit | 4c3d77032316bc8814cddc00d020ba00d4533999 (patch) | |
| tree | 1862e30966a69bf94a7288b95baed5b04a040d80 /protocols/Steam/src/steam_avatars.cpp | |
| parent | 4b5082aef3817173bc254755c0ec352da064a440 (diff) | |
Steam:
- contact statuses are back;
- contact info is back too;
- Miranda's account status is passed to the server;
- some old code removed;
Diffstat (limited to 'protocols/Steam/src/steam_avatars.cpp')
| -rw-r--r-- | protocols/Steam/src/steam_avatars.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
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 };
|
