diff options
author | Eion Robb <eion@robbmob.com> | 2018-04-18 03:56:38 +0300 |
---|---|---|
committer | Eion Robb <eion@robbmob.com> | 2018-04-18 03:56:38 +0300 |
commit | a97ca27a224a3b619a47f18ba23dcf12bbf0a459 (patch) | |
tree | b5190165d3ef45fd6c0a1a847ea5e6a121aa35fe | |
parent | 7f761df2746a8ab518fd620e50df089421df9819 (diff) |
Fix for issue 169 when we unexpectedly recieve the state of a group instead of a friend
-rw-r--r-- | steam-mobile/libsteam.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/steam-mobile/libsteam.c b/steam-mobile/libsteam.c index c0bc38a..82ee838 100644 --- a/steam-mobile/libsteam.c +++ b/steam-mobile/libsteam.c @@ -770,13 +770,16 @@ steam_poll_cb(SteamAccount *sa, JsonObject *obj, gpointer user_data) {
gint64 personastate = json_object_get_int_member(message, "persona_state");
const gchar *steamid = json_object_get_string_member(message, "steamid_from");
- purple_prpl_got_user_status(sa->account, steamid, steam_personastate_to_statustype(personastate), NULL);
- serv_got_alias(sa->pc, steamid, json_object_get_string_member(message, "persona_name"));
-
- g_string_append_c(users_to_update, ',');
- g_string_append(users_to_update, steamid);
- steam_get_friend_state(sa, steamid);
+ if (!STEAMID_IS_GROUP(steamid)) {
+ purple_prpl_got_user_status(sa->account, steamid, steam_personastate_to_statustype(personastate), NULL);
+ serv_got_alias(sa->pc, steamid, json_object_get_string_member(message, "persona_name"));
+
+ g_string_append_c(users_to_update, ',');
+ g_string_append(users_to_update, steamid);
+
+ steam_get_friend_state(sa, steamid);
+ }
} else if (g_str_equal(type, "personarelationship"))
{
const gchar *steamid = json_object_get_string_member(message, "steamid_from");
|