2
0
mirror of https://github.com/ars3niy/tdlib-purple synced 2025-08-31 05:55:08 +00:00

Changed the way user name is prepended to notifications

Add the user name when deciding to show notifications, and also do it in
private chats
This commit is contained in:
Arseniy Lartsev
2020-05-20 15:13:06 +02:00
parent 790457db75
commit 0a55a34625
6 changed files with 110 additions and 65 deletions

View File

@@ -247,16 +247,9 @@ static void showMessageTextChat(PurpleAccount *account, const td::td_api::chat &
}
if (notification) {
std::string fullText;
if (!(flags & PURPLE_MESSAGE_SEND)) {
fullText = message.sender;
if (!fullText.empty())
fullText += ": ";
}
fullText += notification;
if (conv)
purple_conversation_write(purple_conv_chat_get_conversation(conv), nullptr,
fullText.c_str(), PURPLE_MESSAGE_SYSTEM, message.timestamp);
notification, PURPLE_MESSAGE_SYSTEM, message.timestamp);
}
}