reuse event ID when updating power level events
- (when updating power level events for pseudo IDs) - before this, there were some subtle bugs arising from mismatched event IDs
This commit is contained in:
parent
4b4fab209c
commit
5c014faa18
|
@ -519,7 +519,7 @@ func (p *PDUStreamProvider) updatePowerLevelEvent(ctx context.Context, ev *rstyp
|
||||||
}
|
}
|
||||||
|
|
||||||
var evNew gomatrixserverlib.PDU
|
var evNew gomatrixserverlib.PDU
|
||||||
evNew, err = gomatrixserverlib.MustGetRoomVersion(gomatrixserverlib.RoomVersionPseudoIDs).NewEventFromTrustedJSON(newEv, false)
|
evNew, err = gomatrixserverlib.MustGetRoomVersion(gomatrixserverlib.RoomVersionPseudoIDs).NewEventFromTrustedJSONWithEventID(ev.EventID(), newEv, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue