Skip to content

Commit

Permalink
adds log when max payload size is reached
Browse files Browse the repository at this point in the history
  • Loading branch information
zlshames committed Feb 9, 2023
1 parent c632084 commit 2991dc3
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ export class MessageSerializer {

// If we've reached out max size, we need to clear the participants
if (len > config.maxSizeBytes) {
Server().log(
`MessageSerializer: Max size reached (${config.maxSizeBytes} bytes). Clearing participants.`,
'debug'
);
for (let i = 0; i < messageResponses.length; i++) {
for (let c = 0; c < (messageResponses[i]?.chats ?? []).length; c++) {
if (isEmpty(messageResponses[i].chats[c].participants)) continue;
Expand Down

0 comments on commit 2991dc3

Please sign in to comment.