Skip to content

Commit

Permalink
Preserve link preview settings on reschedule.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Jul 24, 2024
1 parent c81f406 commit 1ef6f46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions Telegram/SourceFiles/api/api_editing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,7 @@ mtpRequestId EditMessage(
const auto &text = item->originalText();
const auto webpage = (!item->media() || !item->media()->webpage())
? Data::WebPageDraft{ .removed = true }
: Data::WebPageDraft{
.id = item->media()->webpage()->id,
};
: Data::WebPageDraft::FromItem(item);
return EditMessage(
item,
text,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ void WebpageProcessor::apply(Data::WebPageDraft draft, bool reparse) {
const auto was = _link;
if (draft.removed) {
_draft = draft;
_parsedLinks = _parser.list().current();
if (_parsedLinks.empty()) {
_draft.removed = false;
}
Expand Down

0 comments on commit 1ef6f46

Please sign in to comment.