mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Add ability to use 'me' in place of user id for APIv4 (#5826)
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user