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

Added test for some messages other than text and photo

This commit is contained in:
Arseniy Lartsev
2020-05-08 15:01:04 +02:00
parent d682a2d4c5
commit 5f893255f7
5 changed files with 268 additions and 47 deletions

View File

@@ -440,8 +440,11 @@ static void showMessageText(PurpleAccount *account, const char *purpleUserName,
}
if (notification) {
if (conv == NULL)
conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, purpleUserName);
if (conv == NULL) {
conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, purpleUserName, account);
if (conv == NULL)
conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, purpleUserName);
}
purple_conversation_write(conv, nullptr, notification, PURPLE_MESSAGE_SYSTEM, timestamp);
}
}