mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-05 00:55:12 +00:00
Some internal HistoryItem refactoring.
Replace most IsServerMsgId / id <=> 0 with isRegular(). Track isLocal / isHistoryEntry in flags. Remove toHistoryMessage.
This commit is contained in:
@@ -674,13 +674,13 @@ void Manager::openNotificationMessage(
|
||||
not_null<History*> history,
|
||||
MsgId messageId) {
|
||||
const auto openExactlyMessage = [&] {
|
||||
if (history->peer->isUser()
|
||||
|| history->peer->isChannel()
|
||||
|| !IsServerMsgId(messageId)) {
|
||||
if (history->peer->isUser() || history->peer->isChannel()) {
|
||||
return false;
|
||||
}
|
||||
const auto item = history->owner().message(history->channelId(), messageId);
|
||||
if (!item || !item->mentionsMe()) {
|
||||
const auto item = history->owner().message(
|
||||
history->channelId(),
|
||||
messageId);
|
||||
if (!item || !item->isRegular() || !item->mentionsMe()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user