2
0
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:
23rd
2020-05-28 10:59:13 +03:00
parent c350e33dd8
commit 31fa2d9355
2 changed files with 5 additions and 0 deletions

View File

@@ -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;