Mercurial > pidgin.yaz
comparison src/protocols/sametime/sametime.c @ 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 | da9fd490cef9 |
children | 547c199072c8 |
comparison
equal
deleted
inserted
replaced
12741:2b61e6ed85c3 | 12742:258871a62600 |
---|---|
1739 | 1739 |
1740 DEBUG_INFO("received invitation from '%s' to join ('%s','%s'): '%s'\n", | 1740 DEBUG_INFO("received invitation from '%s' to join ('%s','%s'): '%s'\n", |
1741 NSTR(c_inviter), NSTR(c_name), | 1741 NSTR(c_inviter), NSTR(c_name), |
1742 NSTR(c_topic), NSTR(c_invitation)); | 1742 NSTR(c_topic), NSTR(c_invitation)); |
1743 | 1743 |
1744 if(! c_topic) c_topic = "(no title)"; | |
1745 if(! c_invitation) c_invitation = "(no message)"; | |
1744 serv_got_chat_invite(gc, c_topic, c_inviter, c_invitation, ht); | 1746 serv_got_chat_invite(gc, c_topic, c_inviter, c_invitation, ht); |
1745 } | 1747 } |
1746 | 1748 |
1747 | 1749 |
1748 /* The following mess helps us relate a mwConference to a GaimConvChat | 1750 /* The following mess helps us relate a mwConference to a GaimConvChat |
1787 struct mwGaimPluginData *pd; | 1789 struct mwGaimPluginData *pd; |
1788 GaimConnection *gc; | 1790 GaimConnection *gc; |
1789 GaimConversation *g_conf; | 1791 GaimConversation *g_conf; |
1790 | 1792 |
1791 const char *n = mwConference_getName(conf); | 1793 const char *n = mwConference_getName(conf); |
1794 const char *t = mwConference_getTitle(conf); | |
1792 | 1795 |
1793 DEBUG_INFO("conf %s opened, %u initial members\n", | 1796 DEBUG_INFO("conf %s opened, %u initial members\n", |
1794 NSTR(n), g_list_length(members)); | 1797 NSTR(n), g_list_length(members)); |
1795 | 1798 |
1796 srvc = mwConference_getService(conf); | 1799 srvc = mwConference_getService(conf); |
1797 session = mwService_getSession(MW_SERVICE(srvc)); | 1800 session = mwService_getSession(MW_SERVICE(srvc)); |
1798 pd = mwSession_getClientData(session); | 1801 pd = mwSession_getClientData(session); |
1799 gc = pd->gc; | 1802 gc = pd->gc; |
1800 | 1803 |
1801 g_conf = serv_got_joined_chat(gc, CONF_TO_ID(conf), | 1804 if(! t) t = "(no title)"; |
1802 mwConference_getTitle(conf)); | 1805 g_conf = serv_got_joined_chat(gc, CONF_TO_ID(conf), t); |
1803 | 1806 |
1804 mwConference_setClientData(conf, GAIM_CONV_CHAT(g_conf), NULL); | 1807 mwConference_setClientData(conf, GAIM_CONV_CHAT(g_conf), NULL); |
1805 | 1808 |
1806 for(; members; members = members->next) { | 1809 for(; members; members = members->next) { |
1807 struct mwLoginInfo *peer = members->data; | 1810 struct mwLoginInfo *peer = members->data; |
2770 g_hash_table_insert(ht, CHAT_KEY_NAME, g_strdup(name)); | 2773 g_hash_table_insert(ht, CHAT_KEY_NAME, g_strdup(name)); |
2771 g_hash_table_insert(ht, CHAT_KEY_TOPIC, g_strdup(title)); | 2774 g_hash_table_insert(ht, CHAT_KEY_TOPIC, g_strdup(title)); |
2772 g_hash_table_insert(ht, CHAT_KEY_INVITE, g_strdup(message)); | 2775 g_hash_table_insert(ht, CHAT_KEY_INVITE, g_strdup(message)); |
2773 g_hash_table_insert(ht, CHAT_KEY_IS_PLACE, g_strdup("")); /* ugh */ | 2776 g_hash_table_insert(ht, CHAT_KEY_IS_PLACE, g_strdup("")); /* ugh */ |
2774 | 2777 |
2778 if(! title) title = "(no title)"; | |
2779 if(! message) message = "(no message)"; | |
2775 serv_got_chat_invite(pd->gc, title, idb->user, message, ht); | 2780 serv_got_chat_invite(pd->gc, title, idb->user, message, ht); |
2776 | 2781 |
2777 mwConversation_close(conv, ERR_SUCCESS); | 2782 mwConversation_close(conv, ERR_SUCCESS); |
2778 mwConversation_free(conv); | 2783 mwConversation_free(conv); |
2779 } | 2784 } |
2841 GaimConversation *gconf; | 2846 GaimConversation *gconf; |
2842 | 2847 |
2843 GList *members, *l; | 2848 GList *members, *l; |
2844 | 2849 |
2845 const char *n = mwPlace_getName(place); | 2850 const char *n = mwPlace_getName(place); |
2851 const char *t = mwPlace_getTitle(place); | |
2846 | 2852 |
2847 srvc = mwPlace_getService(place); | 2853 srvc = mwPlace_getService(place); |
2848 session = mwService_getSession(MW_SERVICE(srvc)); | 2854 session = mwService_getSession(MW_SERVICE(srvc)); |
2849 pd = mwSession_getClientData(session); | 2855 pd = mwSession_getClientData(session); |
2850 gc = pd->gc; | 2856 gc = pd->gc; |
2852 members = mwPlace_getMembers(place); | 2858 members = mwPlace_getMembers(place); |
2853 | 2859 |
2854 DEBUG_INFO("place %s opened, %u initial members\n", | 2860 DEBUG_INFO("place %s opened, %u initial members\n", |
2855 NSTR(n), g_list_length(members)); | 2861 NSTR(n), g_list_length(members)); |
2856 | 2862 |
2857 gconf = serv_got_joined_chat(gc, PLACE_TO_ID(place), | 2863 if(! t) t = "(no title)"; |
2858 mwPlace_getTitle(place)); | 2864 gconf = serv_got_joined_chat(gc, PLACE_TO_ID(place), t); |
2859 | 2865 |
2860 mwPlace_setClientData(place, gconf, NULL); | 2866 mwPlace_setClientData(place, gconf, NULL); |
2861 | 2867 |
2862 for(l = members; l; l = l->next) { | 2868 for(l = members; l; l = l->next) { |
2863 struct mwIdBlock *idb = l->data; | 2869 struct mwIdBlock *idb = l->data; |