aboutsummaryrefslogtreecommitdiff
path: root/clientapi/routing/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'clientapi/routing/state.go')
-rw-r--r--clientapi/routing/state.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/clientapi/routing/state.go b/clientapi/routing/state.go
index d7f0b40f..6f363349 100644
--- a/clientapi/routing/state.go
+++ b/clientapi/routing/state.go
@@ -173,19 +173,14 @@ func OnIncomingStateRequest(ctx context.Context, device *userapi.Device, rsAPI a
}
for _, ev := range stateAfterRes.StateEvents {
sender := spec.UserID{}
- evRoomID, err := spec.NewRoomID(ev.RoomID())
- if err != nil {
- util.GetLogger(ctx).WithError(err).Error("Event roomID is invalid")
- continue
- }
- userID, err := rsAPI.QueryUserIDForSender(ctx, *evRoomID, ev.SenderID())
+ userID, err := rsAPI.QueryUserIDForSender(ctx, ev.RoomID(), ev.SenderID())
if err == nil && userID != nil {
sender = *userID
}
sk := ev.StateKey()
if sk != nil && *sk != "" {
- skUserID, err := rsAPI.QueryUserIDForSender(ctx, *evRoomID, spec.SenderID(*ev.StateKey()))
+ skUserID, err := rsAPI.QueryUserIDForSender(ctx, ev.RoomID(), spec.SenderID(*ev.StateKey()))
if err == nil && skUserID != nil {
skString := skUserID.String()
sk = &skString