mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Added ScheduledMessages::lookupItem for FullMsgId.
This commit is contained in:
@@ -133,6 +133,10 @@ HistoryItem *ScheduledMessages::lookupItem(PeerId peer, MsgId msg) const {
|
||||
return (*j).get();
|
||||
}
|
||||
|
||||
HistoryItem *ScheduledMessages::lookupItem(FullMsgId itemId) const {
|
||||
return lookupItem(peerFromChannel(itemId.channel), itemId.msg);
|
||||
}
|
||||
|
||||
int ScheduledMessages::count(not_null<History*> history) const {
|
||||
const auto i = _data.find(history);
|
||||
return (i != end(_data)) ? i->second.items.size() : 0;
|
||||
|
@@ -30,6 +30,7 @@ public:
|
||||
|
||||
[[nodiscard]] MsgId lookupId(not_null<HistoryItem*> item) const;
|
||||
[[nodiscard]] HistoryItem *lookupItem(PeerId peer, MsgId msg) const;
|
||||
[[nodiscard]] HistoryItem *lookupItem(FullMsgId itemId) const;
|
||||
[[nodiscard]] int count(not_null<History*> history) const;
|
||||
|
||||
void checkEntitiesAndUpdate(const MTPDmessage &data);
|
||||
|
Reference in New Issue
Block a user