aboutsummaryrefslogtreecommitdiff
path: root/syncapi/types/types.go
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2022-11-29 15:46:28 +0100
committerGitHub <noreply@github.com>2022-11-29 15:46:28 +0100
commitf8d1dc521d401b78163840d8ff978cb2cd2718d7 (patch)
tree011d098dae221b8d688f732812aba53ae8720873 /syncapi/types/types.go
parent1990c154e920a350654d0ae6e02071950e595a01 (diff)
Fix `m.receipt`s causing notifications (#2893)
Fixes https://github.com/matrix-org/dendrite/issues/2353
Diffstat (limited to 'syncapi/types/types.go')
-rw-r--r--syncapi/types/types.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/syncapi/types/types.go b/syncapi/types/types.go
index 295187ac..9fbadc06 100644
--- a/syncapi/types/types.go
+++ b/syncapi/types/types.go
@@ -480,6 +480,13 @@ func (jr JoinResponse) MarshalJSON() ([]byte, error) {
if jr.Ephemeral != nil && len(jr.Ephemeral.Events) == 0 {
a.Ephemeral = nil
}
+ if jr.Ephemeral != nil {
+ // Remove the room_id from EDUs, as this seems to cause Element Web
+ // to trigger notifications - https://github.com/vector-im/element-web/issues/17263
+ for i := range jr.Ephemeral.Events {
+ jr.Ephemeral.Events[i].RoomID = ""
+ }
+ }
if jr.AccountData != nil && len(jr.AccountData.Events) == 0 {
a.AccountData = nil
}