changeset 12742:258871a62600

[gaim-migrate @ 15089] fixing a sametime bug with chat invites that have no title or invitation message committer: Tailor Script <tailor@pidgin.im>
author Christopher O'Brien <siege@pidgin.im>
date Fri, 06 Jan 2006 03:39:21 +0000
parents 2b61e6ed85c3
children 33ed71b35a43
files src/protocols/sametime/sametime.c
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/sametime/sametime.c	Fri Jan 06 00:32:19 2006 +0000
+++ b/src/protocols/sametime/sametime.c	Fri Jan 06 03:39:21 2006 +0000
@@ -1741,6 +1741,8 @@
 	     NSTR(c_inviter), NSTR(c_name),
 	     NSTR(c_topic), NSTR(c_invitation));
 
+  if(! c_topic) c_topic = "(no title)";
+  if(! c_invitation) c_invitation = "(no message)";
   serv_got_chat_invite(gc, c_topic, c_inviter, c_invitation, ht);
 }
 
@@ -1789,6 +1791,7 @@
   GaimConversation *g_conf;
 
   const char *n = mwConference_getName(conf);
+  const char *t = mwConference_getTitle(conf);
 
   DEBUG_INFO("conf %s opened, %u initial members\n",
 	     NSTR(n), g_list_length(members));
@@ -1798,8 +1801,8 @@
   pd = mwSession_getClientData(session);
   gc = pd->gc;
 
-  g_conf = serv_got_joined_chat(gc, CONF_TO_ID(conf),
-				mwConference_getTitle(conf));
+  if(! t) t = "(no title)";
+  g_conf = serv_got_joined_chat(gc, CONF_TO_ID(conf), t);
 
   mwConference_setClientData(conf, GAIM_CONV_CHAT(g_conf), NULL);
 
@@ -2772,6 +2775,8 @@
   g_hash_table_insert(ht, CHAT_KEY_INVITE, g_strdup(message));
   g_hash_table_insert(ht, CHAT_KEY_IS_PLACE, g_strdup("")); /* ugh */
 
+  if(! title) title = "(no title)";
+  if(! message) message = "(no message)";
   serv_got_chat_invite(pd->gc, title, idb->user, message, ht);
 
   mwConversation_close(conv, ERR_SUCCESS);
@@ -2843,6 +2848,7 @@
   GList *members, *l;
 
   const char *n = mwPlace_getName(place);
+  const char *t = mwPlace_getTitle(place);
 
   srvc = mwPlace_getService(place);
   session = mwService_getSession(MW_SERVICE(srvc));
@@ -2854,8 +2860,8 @@
   DEBUG_INFO("place %s opened, %u initial members\n",
 	     NSTR(n), g_list_length(members));
 
-  gconf = serv_got_joined_chat(gc, PLACE_TO_ID(place),
-			       mwPlace_getTitle(place));
+  if(! t) t = "(no title)";
+  gconf = serv_got_joined_chat(gc, PLACE_TO_ID(place), t);
 
   mwPlace_setClientData(place, gconf, NULL);