Skip to content

fix: Avoid pushing empty messages - #6937

Merged
max-nextcloud merged 1 commit into
mainfrom
fix/empty-message-error
Mar 15, 2025
Merged

fix: Avoid pushing empty messages#6937
max-nextcloud merged 1 commit into
mainfrom
fix/empty-message-error

Conversation

@juliusknorr

@juliusknorrjuliusknorr commented Mar 10, 2025

Copy link
Copy Markdown
Member

Found in sentry
Fixes a regular js console error when using notify_push where the awareness message may be pushed as empty string.

We avoid this filtering on the backend before we emit the messages over notify_push, but @max-nextcloud do you happen to know if seeing those empty awareness messages being pushed is expected?

Screenshot 2025-03-10 at 12 58 08Screenshot 2025-03-10 at 12 58 43

Without this PR parsing the empty data fails in

constencoder=readMessage(provider,newUint8Array(event.data),true)

Signed-off-by: Julius Knorr <jus@bitgrid.net>
@juliusknorr
juliusknorr requested review from a team and removed request for a teamMarch 10, 2025 12:03
@max-nextcloud

Copy link
Copy Markdown
Collaborator

/backport to stable31

@max-nextcloud
max-nextcloud merged commit f25a9ec into mainMar 15, 2025
@max-nextcloud
max-nextcloud deleted the fix/empty-message-error branch March 15, 2025 08:01
@max-nextcloud

Copy link
Copy Markdown
Collaborator

Good catch!!

I don't know if these are expected off the top of my head. I think we still store the awareness messages in the session data. That might cause an empty string if no awareness has ever been send from the users but the session still exists.

Would be good to clean up the awareness handling. I'll create a follow up issue.

@max-nextcloud

Copy link
Copy Markdown
Collaborator

/backport to stable30

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewbugSomething isn't workinglog finding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@juliusknorr@max-nextcloud