<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1104,6 +1104,7 @@ plain_msg(MsnCmdProc *cmdproc, MsnMessage *msg)
     char *body_enc;
     char *body_final;
     char *alias_backup = NULL;
+    gboolean alias_faked = FALSE;
     size_t body_len;
     char *passport;
     const char *value;
@@ -1138,7 +1139,8 @@ plain_msg(MsnCmdProc *cmdproc, MsnMessage *msg)
     if ((value = msn_message_get_attr(msg, &quot;P4-Context&quot;)) != NULL)
     {
         alias_backup = g_strdup(buddy-&gt;alias);
-        purple_buddy_set_private_alias(gc, passport, value);
+        purple_buddy_set_public_alias(gc, passport, value);
+        alias_faked = TRUE;
     }
 
     if ((value = msn_message_get_attr(msg, &quot;X-MMS-IM-Format&quot;)) != NULL)
@@ -1214,9 +1216,9 @@ plain_msg(MsnCmdProc *cmdproc, MsnMessage *msg)
         }
     }
 
-    if (alias_backup)
+    if (alias_faked)
     {
-        purple_buddy_set_private_alias(gc, passport, alias_backup);
+        purple_buddy_set_public_alias(gc, passport, alias_backup);
         g_free(alias_backup);
     }
 </diff>
      <filename>switchboard.c</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>779ea2ea4aa0dbf57be42af064afc2e627b08562</id>
    </parent>
  </parents>
  <author>
    <name>Felipe Contreras</name>
    <email>felipe.contreras@gmail.com</email>
  </author>
  <url>http://github.com/felipec/msn-pecan/commit/3ca18140149aede5ae9b55dc590b4335ff9402b5</url>
  <id>3ca18140149aede5ae9b55dc590b4335ff9402b5</id>
  <committed-date>2009-07-05T16:00:38-07:00</committed-date>
  <authored-date>2009-07-05T15:56:42-07:00</authored-date>
  <message>sb: more proper usage of P4-Context

As spotted by Elliott Sales de Andrade, the P4-Context alias is not
cleared.

This is probably because when there's no private-alias, alias_backup is
NULL, and therefore no restoration happens. For starters public-alias
should be safer because essentially everyone has one so alias_backup
will never be NULL, but the proper way to ensuer is with an independent
flag.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;</message>
  <tree>65fa32cc1eca371107d84d0bc742d848bae55016</tree>
  <committer>
    <name>Felipe Contreras</name>
    <email>felipe.contreras@gmail.com</email>
  </committer>
</commit>
