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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user