Commit 401deee4 authored by Vitaly Takmazov's avatar Vitaly Takmazov

libpurple: prefer purple_account_get_name_for_display over purple_connection_get_display_name

parent 72c7f014
......@@ -780,17 +780,18 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
}
if (CONFIG_STRING(config, "service.protocol") != "prpl-jabber") {
np->handleParticipantChanged(np->m_accounts[account], nickname, room, 0, pbnetwork::STATUS_ONLINE);
const char *disp;
if ((disp = purple_connection_get_display_name(account->gc)) == NULL) {
disp = purple_account_get_username(account);
}
LOG4CXX_INFO(logger, user << ": Display name is " << disp << ", nickname is " << nickname);
if (nickname != disp) {
handleRoomNicknameChanged(np->m_accounts[account], room, disp);
np->handleParticipantChanged(np->m_accounts[account], nickname, room, 0, pbnetwork::STATUS_ONLINE, "", disp);
}
np->handleParticipantChanged(np->m_accounts[account], nickname, room, 0, pbnetwork::STATUS_ONLINE);
const char *disp;
if ((disp = purple_account_get_name_for_display(account)) == NULL) {
if ((disp = purple_connection_get_display_name(account->gc)) == NULL) {
disp = purple_account_get_username(account);
}
}
LOG4CXX_INFO(logger, user << ": Display name is " << disp << ", nickname is " << nickname);
if (nickname != disp) {
handleRoomNicknameChanged(np->m_accounts[account], room, disp);
np->handleParticipantChanged(np->m_accounts[account], nickname, room, 0, pbnetwork::STATUS_ONLINE, "", disp);
}
}
LOG4CXX_INFO(logger, user << ": Joining the room " << roomName);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment