update HTML with new methods

This commit is contained in:
2022-11-21 22:52:44 +01:00
parent d5aea1a828
commit 03c35d6446
17 changed files with 374 additions and 234 deletions

View File

@@ -1356,6 +1356,9 @@ func (h APIHandler) CreateMessage(g *gin.Context) ginresp.HTTPResponse {
if b.Content != nil && len(*b.Content) > user.MaxContentLength() {
return ginresp.SendAPIError(g, 400, apierr.CONTENT_TOO_LONG, 104, fmt.Sprintf("Content too long (%d characters; max := %d characters)", len(*b.Content), user.MaxContentLength()), nil)
}
if len(channelName) > user.MaxChannelNameLength() {
return ginresp.SendAPIError(g, 400, apierr.CONTENT_TOO_LONG, 106, fmt.Sprintf("Channel too long (max %d characters)", user.MaxChannelNameLength()), nil)
}
if b.UserMessageID != nil {
msg, err := h.database.GetMessageByUserMessageID(ctx, *b.UserMessageID)