summaryrefslogtreecommitdiffstats
path: root/api4/context.go
diff options
context:
space:
mode:
Diffstat (limited to 'api4/context.go')
-rw-r--r--api4/context.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/api4/context.go b/api4/context.go
index 90f39ce5f..0566fbc23 100644
--- a/api4/context.go
+++ b/api4/context.go
@@ -405,6 +405,17 @@ func (c *Context) RequireReportId() *Context {
return c
}
+func (c *Context) RequireEmojiId() *Context {
+ if c.Err != nil {
+ return c
+ }
+
+ if len(c.Params.EmojiId) != 26 {
+ c.SetInvalidUrlParam("emoji_id")
+ }
+ return c
+}
+
func (c *Context) RequireTeamName() *Context {
if c.Err != nil {
return c