diff options
author | eionrobb <eionrobb@8ca6c67d-4297-256d-f884-781da6d5760b> | 2012-04-12 05:00:43 +0400 |
---|---|---|
committer | eionrobb <eionrobb@8ca6c67d-4297-256d-f884-781da6d5760b> | 2012-04-12 05:00:43 +0400 |
commit | 7336af4d8776e60c2bf79cddf8665e7a481fe499 (patch) | |
tree | 0c82d0a844f425f4f47436f6fa3248da84e1c40e | |
parent | df603e8ee6adfe384bd978e4bdba7db18eb016b2 (diff) |
Fix the 'User has left the conversation' message so that it shows the correct user's name rather than "/me" and so that it won't trigger auto-reply notifications
-rw-r--r-- | steam-mobile/libsteam.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/steam-mobile/libsteam.c b/steam-mobile/libsteam.c index 61de36c..ddfb380 100644 --- a/steam-mobile/libsteam.c +++ b/steam-mobile/libsteam.c @@ -395,7 +395,11 @@ steam_poll_cb(SteamAccount *sa, JsonObject *obj, gpointer user_data) } else if (g_str_equal(type, "leftconversation"))
{
const gchar *steamid = json_object_get_string_member(message, "steamid_from");
- serv_got_im(sa->pc, steamid, "/me has left the conversation", PURPLE_MESSAGE_RECV | PURPLE_MESSAGE_SYSTEM, time(NULL));
+ PurpleConversation *conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, steamid, sa->account);
+ const gchar *alias = purple_buddy_get_alias(purple_find_buddy(sa->account, steamid));
+ gchar *has_left_msg = g_strdup_printf("%s has left the conversation", alias ? alias : "User");
+ purple_conversation_write(conv, "", has_left_msg, PURPLE_MESSAGE_SYSTEM, time(NULL));
+ g_free(has_left_msg);
}
}
|