Changeset - dc6c6f8337db
[Not reviewed]
0 1 0
Jan Kaluza - 9 years ago 2016-02-07 22:57:13
jkaluza@redhat.com
Libpurple: Change the nickname before joining the room to match the nickname used by the libpurple
1 file changed with 8 insertions and 0 deletions:
0 comments (0 inline, 0 general)
backends/libpurple/main.cpp
Show inline comments
 
@@ -701,12 +701,20 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
 
			}
 
			else if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults != NULL) {
 
				if (CONFIG_STRING(config, "service.protocol") == "prpl-jabber") {
 
					comps = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults(gc, (room + "/" + nickname).c_str());
 
				} else {
 
					comps = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults(gc, room.c_str());
 
					np->handleParticipantChanged(np->m_accounts[account], nickname, room, 0, pbnetwork::STATUS_ONLINE);
 
					const char *disp;
 
					if ((disp = purple_connection_get_display_name(account->gc))) {
 
						handleRoomNicknameChanged(np->m_accounts[account], room, disp);
 
					}
 
					else {
 
						handleRoomNicknameChanged(np->m_accounts[account], room, purple_account_get_username(account));
 
					}
 
				}
 
			}
 

	
 
			LOG4CXX_INFO(logger, user << ": Joining the room " << room);
 
			if (comps) {
 
				serv_join_chat_wrapped(gc, comps);
0 comments (0 inline, 0 general)