aboutsummaryrefslogtreecommitdiff
path: root/syncapi/streams/stream_invite.go
diff options
context:
space:
mode:
Diffstat (limited to 'syncapi/streams/stream_invite.go')
-rw-r--r--syncapi/streams/stream_invite.go15
1 files changed, 5 insertions, 10 deletions
diff --git a/syncapi/streams/stream_invite.go b/syncapi/streams/stream_invite.go
index 1424dc2e..a3634c03 100644
--- a/syncapi/streams/stream_invite.go
+++ b/syncapi/streams/stream_invite.go
@@ -75,20 +75,15 @@ func (p *InviteStreamProvider) IncrementalSync(
user = *sender
}
- sk := inviteEvent.StateKey()
- if sk != nil && *sk != "" {
- skUserID, err := p.rsAPI.QueryUserIDForSender(ctx, inviteEvent.RoomID(), spec.SenderID(*inviteEvent.StateKey()))
- if err == nil && skUserID != nil {
- skString := skUserID.String()
- sk = &skString
- }
- }
-
// skip ignored user events
if _, ok := req.IgnoredUsers.List[user.String()]; ok {
continue
}
- ir := types.NewInviteResponse(inviteEvent, user, sk, eventFormat)
+ ir, err := types.NewInviteResponse(ctx, p.rsAPI, inviteEvent, eventFormat)
+ if err != nil {
+ req.Log.WithError(err).Error("failed creating invite response")
+ continue
+ }
req.Response.Rooms.Invite[roomID] = ir
}