Libpurple: More topic debug

This commit is contained in:
Jan Kaluza 2016-02-18 17:15:47 +01:00
parent 84f688128c
commit 71a69aee20

View file

@ -1314,6 +1314,7 @@ static gboolean conv_has_focus(PurpleConversation *conv) {
} }
static void conv_chat_topic_changed(PurpleConversation *conv, const char *who, const char *topic) { static void conv_chat_topic_changed(PurpleConversation *conv, const char *who, const char *topic) {
LOG4CXX_INFO(logger, "Conversation topic changed");
PurpleAccount *account = purple_conversation_get_account_wrapped(conv); PurpleAccount *account = purple_conversation_get_account_wrapped(conv);
np->handleSubject(np->m_accounts[account], purple_conversation_get_name_wrapped(conv), topic ? topic : "", who ? who : "Spectrum 2"); np->handleSubject(np->m_accounts[account], purple_conversation_get_name_wrapped(conv), topic ? topic : "", who ? who : "Spectrum 2");
} }
@ -1324,6 +1325,9 @@ static void conv_present(PurpleConversation *conv) {
if (topic && *topic != '\0') { if (topic && *topic != '\0') {
conv_chat_topic_changed(conv, topic, PURPLE_CONV_CHAT_WRAPPED(conv)->who); conv_chat_topic_changed(conv, topic, PURPLE_CONV_CHAT_WRAPPED(conv)->who);
} }
else {
LOG4CXX_INFO(logger, "Conversation created with an empty topic");
}
} }
} }