mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Added processing of recent self forwards to share box.
This commit is contained in:
@@ -1733,6 +1733,8 @@ ShareBox::SubmitCallback ShareBox::DefaultForwardCallback(
|
||||
const auto donePhraseArgs = CreateForwardedMessagePhraseArgs(
|
||||
result,
|
||||
msgIds);
|
||||
const auto showRecentForwardsToSelf = result.size() == 1
|
||||
&& result.front()->peer()->isSelf();
|
||||
const auto requestType = Data::Histories::RequestType::Send;
|
||||
for (const auto thread : result) {
|
||||
if (!comment.text.isEmpty()) {
|
||||
@@ -1790,6 +1792,13 @@ ShareBox::SubmitCallback ShareBox::DefaultForwardCallback(
|
||||
Api::SuggestToMTP(options.suggest)
|
||||
)).done([=](const MTPUpdates &updates, mtpRequestId reqId) {
|
||||
threadHistory->session().api().applyUpdates(updates);
|
||||
if (showRecentForwardsToSelf) {
|
||||
ApiWrap::ProcessRecentSelfForwards(
|
||||
&threadHistory->session(),
|
||||
updates,
|
||||
peer->id,
|
||||
history->peer->id);
|
||||
}
|
||||
state->requests.remove(reqId);
|
||||
if (state->requests.empty()) {
|
||||
if (show->valid()) {
|
||||
|
||||
Reference in New Issue
Block a user