Fix rendering displayname change events

This commit is contained in:
Tulir Asokan 2020-06-24 22:59:47 +03:00
parent 68956c4c63
commit ceedeb7a41

View File

@ -277,6 +277,7 @@ func getMembershipEventContent(room *rooms.Room, evt *muksevt.Event) (sender str
prevMembership := event.MembershipLeave
prevDisplayname := *evt.StateKey
if evt.Unsigned.PrevContent != nil {
_ = evt.Unsigned.PrevContent.ParseRaw(evt.Type)
prevContent := evt.Unsigned.PrevContent.AsMember()
prevMembership = prevContent.Membership
prevDisplayname = prevContent.Displayname