Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Controller/ChatController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,7 @@ public function getObjectsSharedInRoomOverview(int $limit = 7): DataResponse {

if ($objectType === Attachment::TYPE_PINNED) {
// Enforce sort order of pinned messages again after loading them from the comments table instead of attachments
uasort($messagesByType[$objectType], static fn (array $m1, array $m2): int => ($m2['metaData'][Message::METADATA_PINNED_AT] ?? 0) <=> ($m1['metaData'][Message::METADATA_PINNED_AT] ?? 0));
uasort($messagesByType[$objectType], static fn (array $m1, array $m2): int => ($m2['metaData']['pinnedAt'] ?? 0) <=> ($m1['metaData']['pinnedAt'] ?? 0));
}
}

Expand Down Expand Up @@ -1708,7 +1708,7 @@ public function getObjectsSharedInRoom(string $objectType, int $lastKnownMessage
$messages = $this->getMessagesForRoom($messageIds);
if ($objectType === Attachment::TYPE_PINNED) {
// Enforce sort order of pinned messages again after loading them from the comments table instead of attachments
uasort($messages, static fn (array $m1, array $m2): int => ($m2['metaData'][Message::METADATA_PINNED_AT] ?? 0) <=> ($m1['metaData'][Message::METADATA_PINNED_AT] ?? 0));
uasort($messages, static fn (array $m1, array $m2): int => ($m2['metaData']['pinnedAt'] ?? 0) <=> ($m1['metaData']['pinnedAt'] ?? 0));
}

$headers = [];
Expand Down
Loading