-
-
Notifications
You must be signed in to change notification settings - Fork 676
Conversation
@@ -386,11 +386,6 @@ func (a *UserInternalAPI) PerformDeviceUpdate(ctx context.Context, req *api.Perf | |||
} | |||
res.DeviceExists = true | |||
|
|||
if dev.UserID != req.RequestingUserID { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed because we should never ever hit this case, because we are querying the database for the req.RequestingUserID
. (except the database is lying to us?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better yet, change this to accept a device struct so we don't need to do a DB lookup at all!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to look up the device, as one device can update another of the same user.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #3029 +/- ##
==========================================
+ Coverage 65.72% 65.75% +0.03%
==========================================
Files 495 495
Lines 53631 53642 +11
==========================================
+ Hits 35250 35274 +24
+ Misses 14716 14704 -12
+ Partials 3665 3664 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 14 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few small things, overall LGTM
This reverts commit 2854ffe.
This reverts commit 2854ffe.
This reverts commit 2854ffe.
This reverts commit 2854ffe.
This reverts commit 2854ffe.
This reverts commit 2854ffe.
Revert "Add CS API device tests (matrix-org#3029)"
Adds tests for
/devices
/delete_devices
(also adds UIA)