mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-29 00:39:55 +00:00
Moved edit text messages from HistoryWidget to api_editing.
This commit is contained in:
@@ -192,5 +192,21 @@ mtpRequestId EditCaption(
|
||||
return EditMessage(item, caption, SendOptions(), done, fail);
|
||||
}
|
||||
|
||||
mtpRequestId EditTextMessage(
|
||||
not_null<HistoryItem*> item,
|
||||
const TextWithEntities &caption,
|
||||
SendOptions options,
|
||||
Fn<void(const MTPUpdates &, mtpRequestId requestId)> done,
|
||||
Fn<void(const RPCError &, mtpRequestId requestId)> fail) {
|
||||
const auto callback = [=](
|
||||
const auto &result,
|
||||
Fn<void()> applyUpdates,
|
||||
auto id) {
|
||||
applyUpdates();
|
||||
done(result, id);
|
||||
};
|
||||
return EditMessage(item, caption, options, callback, fail);
|
||||
}
|
||||
|
||||
|
||||
} // namespace Api
|
||||
|
||||
Reference in New Issue
Block a user