diff libpurple/protocols/myspace/myspace.c @ 19442:d7cd580c0753

In msimprpl: if no local alias is set, set it to the username on sign-on. This makes conversation logs more symmetric: (3:44:10 PM) msimprpl: hi (3:44:10 PM) msimprpl: hi Closes #2793.
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Sun, 26 Aug 2007 22:44:42 +0000
parents bbb205c49228
children 105305518622
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c	Sun Aug 26 22:23:15 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Sun Aug 26 22:44:42 2007 +0000
@@ -1458,6 +1458,10 @@
 	 * address and not username. Will be freed in msim_session_destroy(). */
 	session->username = msim_msg_get_string(msg, "uniquenick");
 
+	/* If a local alias wasn't set, set it to user's username. */
+	if (!session->account->alias || !strlen(session->account->alias))
+		session->account->alias = session->username;
+
 	/* The session is now set up, ready to be connected. This emits the
 	 * signedOn signal, so clients can now do anything with msimprpl, and
 	 * we're ready for it (session key, userid, username all setup). */
@@ -3010,6 +3014,9 @@
 	/* Need a contact. */
 	g_return_val_if_fail(cid != 0, FALSE);
 
+	/* TODO: if auto=true, "Add all the people on this page to my IM List!", on
+	 * http://collect.myspace.com/index.cfm?fuseaction=im.friendslist. Don't need a cid. */
+
 	/* Convert numeric contact ID back to a string. Needed for looking up. Don't just
 	 * directly use cid directly from parameters, because it might not be numeric. 
 	 * It is trivial to change this to allow cID to be a username, but that's not how