Fix m.receipts causing notifications (#2893)
Fixes https://github.com/matrix-org/dendrite/issues/2353
This commit is contained in:
parent
1990c154e9
commit
f8d1dc521d
3 changed files with 108 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue