2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Fixed crash in bot keyboard replacement. 0.9.41 version.

After username resolve bots always opens conversation, not profile.
This commit is contained in:
John Preston
2016-04-12 01:34:29 +03:00
parent 9cbdc6e95e
commit af014b3c14
3 changed files with 15 additions and 1 deletions

View File

@@ -3734,6 +3734,9 @@ void MainWidget::usernameResolveDone(QPair<MsgId, QString> msgIdAndStartToken, c
if (peer->isUser() && peer->asUser()->botInfo && !peer->asUser()->botInfo->cantJoinGroups && !startToken.isEmpty()) {
peer->asUser()->botInfo->startGroupToken = startToken;
Ui::showLayer(new ContactsBox(peer->asUser()));
} else if (peer->isUser() && peer->asUser()->botInfo) {
// Always open bot chats, even from mention links.
Ui::showPeerHistoryAsync(peer->id, ShowAtUnreadMsgId);
} else {
showPeerProfile(peer);
}