Send client events to appservices (#1603)

* Send client events to appservices

* FormatSync instead of FormatAll
This commit is contained in:
Neil Alexander 2020-12-02 15:14:12 +00:00 committed by GitHub
parent bdf6490375
commit 417c7d3569
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 9 deletions

View file

@ -484,8 +484,7 @@ func NewInviteResponse(event *gomatrixserverlib.HeaderedEvent) *InviteResponse {
// Then we'll see if we can create a partial of the invite event itself.
// This is needed for clients to work out *who* sent the invite.
format, _ := event.RoomVersion.EventFormat()
inviteEvent := gomatrixserverlib.ToClientEvent(event.Unwrap(), format)
inviteEvent := gomatrixserverlib.ToClientEvent(event.Unwrap(), gomatrixserverlib.FormatSync)
inviteEvent.Unsigned = nil
if ev, err := json.Marshal(inviteEvent); err == nil {
res.InviteState.Events = append(res.InviteState.Events, ev)