mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Fix replying to stories with voice messages.
This commit is contained in:
parent
f814e401b9
commit
b8cf00a0b2
3 changed files with 12 additions and 10 deletions
|
@ -35,15 +35,7 @@ constexpr auto kReadRequestTimeout = 3 * crl::time(1000);
|
|||
MTPInputReplyTo ReplyToForMTP(
|
||||
not_null<Session*> owner,
|
||||
FullReplyTo replyTo) {
|
||||
if (replyTo.msgId || replyTo.topicRootId) {
|
||||
using Flag = MTPDinputReplyToMessage::Flag;
|
||||
return MTP_inputReplyToMessage(
|
||||
(replyTo.topicRootId
|
||||
? MTP_flags(Flag::f_top_msg_id)
|
||||
: MTP_flags(0)),
|
||||
MTP_int(replyTo.msgId ? replyTo.msgId : replyTo.topicRootId),
|
||||
MTP_int(replyTo.topicRootId));
|
||||
} else if (replyTo.storyId) {
|
||||
if (replyTo.storyId) {
|
||||
if (const auto peer = owner->peerLoaded(replyTo.storyId.peer)) {
|
||||
if (const auto user = peer->asUser()) {
|
||||
return MTP_inputReplyToStory(
|
||||
|
@ -51,6 +43,14 @@ MTPInputReplyTo ReplyToForMTP(
|
|||
MTP_int(replyTo.storyId.story));
|
||||
}
|
||||
}
|
||||
} else if (replyTo.msgId || replyTo.topicRootId) {
|
||||
using Flag = MTPDinputReplyToMessage::Flag;
|
||||
return MTP_inputReplyToMessage(
|
||||
(replyTo.topicRootId
|
||||
? MTP_flags(Flag::f_top_msg_id)
|
||||
: MTP_flags(0)),
|
||||
MTP_int(replyTo.msgId ? replyTo.msgId : replyTo.topicRootId),
|
||||
MTP_int(replyTo.topicRootId));
|
||||
}
|
||||
return MTPInputReplyTo();
|
||||
}
|
||||
|
|
|
@ -2274,7 +2274,7 @@ void ComposeControls::initVoiceRecordBar() {
|
|||
return std::nullopt;
|
||||
}();
|
||||
if (error) {
|
||||
_show->showBox(Ui::MakeInformBox(*error));
|
||||
_show->showToast(*error);
|
||||
return true;
|
||||
} else if (_showSlowmodeError && _showSlowmodeError()) {
|
||||
return true;
|
||||
|
|
|
@ -421,6 +421,8 @@ void Controller::show(
|
|||
}
|
||||
stories.loadAround(storyId);
|
||||
|
||||
list.user->updateFull();
|
||||
|
||||
if (_contentFaded) {
|
||||
togglePaused(true);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue