Mercurial > pidgin
comparison libpurple/protocols/msn/notification.c @ 31022:78dccab9824c
Add the session user to the userlist. This reduces the amount of
special-casing needed and corrects the buddy icon if you have yourself
on your list.
Fixes #12973.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Fri, 10 Dec 2010 06:38:17 +0000 |
parents | 007ae2d62ea4 |
children | 7d980d6b40e1 |
comparison
equal
deleted
inserted
replaced
31021:007ae2d62ea4 | 31022:78dccab9824c |
---|---|
1248 state = cmd->params[0]; | 1248 state = cmd->params[0]; |
1249 passport = cmd->params[1]; | 1249 passport = cmd->params[1]; |
1250 networkid = atoi(cmd->params[2]); | 1250 networkid = atoi(cmd->params[2]); |
1251 friendly = purple_url_decode(cmd->params[3]); | 1251 friendly = purple_url_decode(cmd->params[3]); |
1252 | 1252 |
1253 if (g_str_equal(passport, session->user->passport)) | 1253 user = msn_userlist_find_user(session->userlist, passport); |
1254 user = session->user; | |
1255 else | |
1256 user = msn_userlist_find_user(session->userlist, passport); | |
1257 if (user == NULL) return; | 1254 if (user == NULL) return; |
1258 | 1255 |
1259 if (msn_user_set_friendly_name(user, friendly) && user != session->user) | 1256 if (msn_user_set_friendly_name(user, friendly) && user != session->user) |
1260 { | 1257 { |
1261 msn_update_contact(session, passport, MSN_UPDATE_DISPLAY, friendly); | 1258 msn_update_contact(session, passport, MSN_UPDATE_DISPLAY, friendly); |
1703 char *psm_str, *str; | 1700 char *psm_str, *str; |
1704 | 1701 |
1705 session = cmdproc->session; | 1702 session = cmdproc->session; |
1706 | 1703 |
1707 passport = cmd->params[0]; | 1704 passport = cmd->params[0]; |
1708 if (g_str_equal(passport, session->user->passport)) | 1705 user = msn_userlist_find_user(session->userlist, passport); |
1709 user = session->user; | |
1710 else | |
1711 user = msn_userlist_find_user(session->userlist, passport); | |
1712 if (user == NULL) { | 1706 if (user == NULL) { |
1713 char *str = g_strndup(payload, len); | 1707 char *str = g_strndup(payload, len); |
1714 purple_debug_info("msn", "unknown user %s, payload is %s\n", | 1708 purple_debug_info("msn", "unknown user %s, payload is %s\n", |
1715 passport, str); | 1709 passport, str); |
1716 g_free(str); | 1710 g_free(str); |