summaryrefslogtreecommitdiffstats
path: root/api4/context.go
diff options
context:
space:
mode:
Diffstat (limited to 'api4/context.go')
-rw-r--r--api4/context.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/api4/context.go b/api4/context.go
index fe2e8d35b..9fb1361bc 100644
--- a/api4/context.go
+++ b/api4/context.go
@@ -333,6 +333,10 @@ func (c *Context) RequireUserId() *Context {
return c
}
+ if c.Params.UserId == model.ME {
+ c.Params.UserId = c.Session.UserId
+ }
+
if len(c.Params.UserId) != 26 {
c.SetInvalidUrlParam("user_id")
}