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

Update API scheme.

This commit is contained in:
John Preston
2021-04-01 15:58:39 +04:00
parent 1cc1f380d0
commit 7cbe158d00
10 changed files with 91 additions and 28 deletions

View File

@@ -405,6 +405,15 @@ void HistoryService::setMessageByAction(const MTPmessageAction &action) {
return result;
};
auto prepareGroupCallScheduled = [this](const MTPDmessageActionGroupCallScheduled &action) {
const auto callId = CallIdFromInput(action.vcall());
const auto peer = history()->peer;
const auto linkCallId = PeerHasThisCall(peer, callId).value_or(false)
? callId
: 0;
return prepareStartedCallText(linkCallId);
};
const auto messageText = action.match([&](
const MTPDmessageActionChatAddUser &data) {
return prepareChatAddUserText(data);
@@ -460,6 +469,8 @@ void HistoryService::setMessageByAction(const MTPmessageAction &action) {
return prepareInviteToGroupCall(data);
}, [&](const MTPDmessageActionSetMessagesTTL &data) {
return prepareSetMessagesTTL(data);
}, [&](const MTPDmessageActionGroupCallScheduled &data) {
return prepareGroupCallScheduled(data);
}, [](const MTPDmessageActionEmpty &) {
return PreparedText{ tr::lng_message_empty(tr::now) };
});