2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-18 14:00:09 +00:00

Fixes for dices and grouping modes in forwarding

This commit is contained in:
RadRussianRus
2021-02-21 03:25:33 +03:00
parent 7260b05900
commit 6d43f949fa
5 changed files with 205 additions and 71 deletions

View File

@@ -228,7 +228,7 @@ void SendExistingPhoto(
forwarding);
}
bool SendDice(Api::MessageToSend &message) {
bool SendDice(Api::MessageToSend &message, Fn<void()> doneCallback) {
const auto full = message.textWithTags.text.midRef(0).trimmed();
auto length = 0;
if (!Ui::Emoji::Find(full.data(), full.data() + full.size(), &length)
@@ -337,6 +337,9 @@ bool SendDice(Api::MessageToSend &message) {
MTP_int(message.action.options.scheduled)
)).done([=](const MTPUpdates &result) {
api->applyUpdates(result, randomId);
if (doneCallback) {
doneCallback();
}
finish();
}).fail([=](const RPCError &error) {
api->sendMessageFail(error, peer, randomId, newId);