fix: Paginate attachments API (#11044)
There are attachments with over 1000 attachments (unusual) in production, and some of them timeout. This PR would limit the number of attachments to 100 (which is sufficient for viewing the files in the gallery, pagination on the UI can be added later).
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
json.meta do
|
||||
json.total_count @attachments_count
|
||||
end
|
||||
|
||||
json.payload @attachments do |attachment|
|
||||
json.message_id attachment.push_event_data[:message_id]
|
||||
json.thumb_url attachment.push_event_data[:thumb_url]
|
||||
|
||||
Reference in New Issue
Block a user