mirror of
https://github.com/ars3niy/tdlib-purple
synced 2025-08-31 14:05:10 +00:00
Prevent some bitlbee crashes
This commit is contained in:
@@ -244,7 +244,7 @@ void updatePrivateChat(TdAccountData &account, const td::td_api::chat *chat, con
|
||||
PurpleConversation *oldConv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, displayName.c_str(),
|
||||
account.purpleAccount);
|
||||
if (oldConv) {
|
||||
purple_conv_im_write(purple_conversation_get_im_data(oldConv), nullptr,
|
||||
purple_conv_im_write(purple_conversation_get_im_data(oldConv), "",
|
||||
// TRANSLATOR: In-chat status update
|
||||
_("Future messages in this conversation will be shown in a different tab"),
|
||||
PURPLE_MESSAGE_SYSTEM, time(NULL));
|
||||
|
@@ -2194,7 +2194,7 @@ void PurpleTdClient::kickUserFromChat(PurpleConversation *conv, const char *name
|
||||
|
||||
if (!chat) {
|
||||
// Unlikely error message not worth translating
|
||||
purple_conversation_write(conv, NULL, "Chat not found", PURPLE_MESSAGE_NO_LOG, time(NULL));
|
||||
purple_conversation_write(conv, "", "Chat not found", PURPLE_MESSAGE_NO_LOG, time(NULL));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2206,7 +2206,7 @@ void PurpleTdClient::kickUserFromChat(PurpleConversation *conv, const char *name
|
||||
"More than one user found with this name";
|
||||
// TRANSLATOR: In-chat error message, argument is a reason (text)
|
||||
std::string message = formatMessage(_("Cannot kick user: {}"), std::string(reason));
|
||||
purple_conversation_write(conv, NULL, message.c_str(), PURPLE_MESSAGE_NO_LOG, 0);
|
||||
purple_conversation_write(conv, "", message.c_str(), PURPLE_MESSAGE_NO_LOG, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user