mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Fix tags for just-sent Saved Messages.
This commit is contained in:
parent
bec34c34b1
commit
f072173d7c
3 changed files with 10 additions and 3 deletions
|
@ -765,7 +765,7 @@ HistoryItem::HistoryItem(
|
||||||
: id(id)
|
: id(id)
|
||||||
, _history(history)
|
, _history(history)
|
||||||
, _from(from ? history->owner().peer(from) : history->peer)
|
, _from(from ? history->owner().peer(from) : history->peer)
|
||||||
, _flags(FinalizeMessageFlags(flags))
|
, _flags(FinalizeMessageFlags(history, flags))
|
||||||
, _date(date) {
|
, _date(date) {
|
||||||
if (isHistoryEntry() && IsClientMsgId(id)) {
|
if (isHistoryEntry() && IsClientMsgId(id)) {
|
||||||
_history->registerClientSideMessage(this);
|
_history->registerClientSideMessage(this);
|
||||||
|
|
|
@ -624,11 +624,16 @@ std::optional<bool> PeerHasThisCall(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] MessageFlags FinalizeMessageFlags(MessageFlags flags) {
|
[[nodiscard]] MessageFlags FinalizeMessageFlags(
|
||||||
|
not_null<History*> history,
|
||||||
|
MessageFlags flags) {
|
||||||
if (!(flags & MessageFlag::FakeHistoryItem)
|
if (!(flags & MessageFlag::FakeHistoryItem)
|
||||||
&& !(flags & MessageFlag::IsOrWasScheduled)
|
&& !(flags & MessageFlag::IsOrWasScheduled)
|
||||||
&& !(flags & MessageFlag::AdminLogEntry)) {
|
&& !(flags & MessageFlag::AdminLogEntry)) {
|
||||||
flags |= MessageFlag::HistoryEntry;
|
flags |= MessageFlag::HistoryEntry;
|
||||||
|
if (history->peer->isSelf()) {
|
||||||
|
flags |= MessageFlag::ReactionsAreTags;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,9 @@ void CheckReactionNotificationSchedule(
|
||||||
not_null<PeerData*> peer,
|
not_null<PeerData*> peer,
|
||||||
PeerId from,
|
PeerId from,
|
||||||
not_null<HistoryItem*> fwd);
|
not_null<HistoryItem*> fwd);
|
||||||
[[nodiscard]] MessageFlags FinalizeMessageFlags(MessageFlags flags);
|
[[nodiscard]] MessageFlags FinalizeMessageFlags(
|
||||||
|
not_null<History*> history,
|
||||||
|
MessageFlags flags);
|
||||||
[[nodiscard]] bool CopyMarkupToForward(not_null<const HistoryItem*> item);
|
[[nodiscard]] bool CopyMarkupToForward(not_null<const HistoryItem*> item);
|
||||||
[[nodiscard]] TextWithEntities EnsureNonEmpty(
|
[[nodiscard]] TextWithEntities EnsureNonEmpty(
|
||||||
const TextWithEntities &text = TextWithEntities());
|
const TextWithEntities &text = TextWithEntities());
|
||||||
|
|
Loading…
Add table
Reference in a new issue