diff options
author | Joas Schilling <coding@schilljs.com> | 2022-03-22 19:02:52 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-03-23 10:40:28 +0300 |
commit | acdbdb7838396ecdfe5a1069c2c0fc5d140bf881 (patch) | |
tree | 45e6a6f943b5b2674463c3a24036f781c0eaf486 /lib/Chat/ChatManager.php | |
parent | 5035644bb9e35b92736cce04cbde6e8c2b709842 (diff) |
Instead of the offset based use lastKnownMessageId as for message
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Chat/ChatManager.php')
-rw-r--r-- | lib/Chat/ChatManager.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Chat/ChatManager.php b/lib/Chat/ChatManager.php index 9209f9342..290867592 100644 --- a/lib/Chat/ChatManager.php +++ b/lib/Chat/ChatManager.php @@ -567,6 +567,25 @@ class ChatManager { /** * Search for comments with a given content * + * @param Room $chat + * @param int $offset + * @param int $limit + * @return IComment[] + */ + public function getSharedObjectMessages(Room $chat, int $offset, int $limit): array { + return $this->commentsManager->getCommentsWithVerbForObjectSinceComment( + 'chat', + (string) $chat->getId(), + ['object_shared'], + $offset, + 'desc', + $limit + ); + } + + /** + * Search for comments with a given content + * * @param string $search content to search for * @param array $objectIds Limit the search by object ids * @param string $verb Limit the verb of the comment |