Skip to content

Commit

Permalink
fix(openapi): Fix chat API list behaviour
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Nov 21, 2024
1 parent 83b7e2e commit 44f1714
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 61 deletions.
7 changes: 7 additions & 0 deletions lib/Chat/ChatManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use OCA\Talk\Model\Message;
use OCA\Talk\Model\Poll;
use OCA\Talk\Participant;
use OCA\Talk\ResponseDefinitions;
use OCA\Talk\Room;
use OCA\Talk\Service\AttachmentService;
use OCA\Talk\Service\ParticipantService;
Expand Down Expand Up @@ -59,6 +60,8 @@
*
* When a message is saved the mentioned users are notified as needed, and
* pending notifications are removed if the messages are deleted.
*
* @psalm-import-type TalkChatMentionSuggestion from ResponseDefinitions
*/
class ChatManager {
public const MAX_CHAT_LENGTH = 32000;
Expand Down Expand Up @@ -950,6 +953,10 @@ public function searchForObjectsWithFilters(string $search, array $objectIds, st
return $this->commentsManager->searchForObjectsWithFilters($search, 'chat', $objectIds, $verb, $since, $until, $actorType, $actorId, $offset, $limit);
}

/**
* @param list<TalkChatMentionSuggestion> $results
* @return list<TalkChatMentionSuggestion>
*/
public function addConversationNotify(array $results, string $search, Room $room, Participant $participant): array {
if ($room->getType() === Room::TYPE_ONE_TO_ONE) {
return $results;
Expand Down
Loading

0 comments on commit 44f1714

Please sign in to comment.