fetchMessages: Add searchOption.messageId and utilize it in _getMessageById (#105)

This fixes issue #104

Co-authored-by: nir <nir@severin>
This commit is contained in:
Nir 2026-03-08 19:40:16 +02:00 • committed by GitHub
commit 073eff93a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -98,6 +98,9 @@ const patchWWebLibrary = async (client) => {
if (searchOptions && searchOptions.since !== undefined && Number.isFinite(searchOptions.since) && m.t < searchOptions.since) {
return false
}
if (searchOptions && searchOptions.messageId !== undefined && m.id.id != searchOptions.messageId) {
return false
}
return true
}