From bbd5ba9ff21c34073e97e5ba390881a1032894e8 Mon Sep 17 00:00:00 2001 From: Claudio Costa Date: Mon, 13 Sep 2021 14:23:50 +0200 Subject: [PATCH] Bump Post.Props size limits (#18370) --- app/webhook_test.go | 3 +-- model/post.go | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/webhook_test.go b/app/webhook_test.go index f453e0c720..2d9f840fc8 100644 --- a/app/webhook_test.go +++ b/app/webhook_test.go @@ -511,8 +511,7 @@ func TestSplitWebhookPostAttachments(t *testing.T) { post: makePost(maxPostSize*3/2, []int{5150, 2000, model.PostPropsMaxUserRunes - 1000}), expected: []*model.Post{ makePost(maxPostSize, nil), - makePost(maxPostSize/2, []int{5150}), - makePost(0, []int{2000}), + makePost(maxPostSize/2, []int{5150, 2000}), makePost(0, []int{model.PostPropsMaxUserRunes - 1000}), }, }, diff --git a/model/post.go b/model/post.go index d889c86cb4..b81cd8e846 100644 --- a/model/post.go +++ b/model/post.go @@ -54,8 +54,8 @@ const ( PostMessageMaxRunesV1 = 4000 PostMessageMaxBytesV2 = 65535 // Maximum size of a TEXT column in MySQL PostMessageMaxRunesV2 = PostMessageMaxBytesV2 / 4 // Assume a worst-case representation - PostPropsMaxRunes = 8000 - PostPropsMaxUserRunes = PostPropsMaxRunes - 400 // Leave some room for system / pre-save modifications + PostPropsMaxRunes = 800000 + PostPropsMaxUserRunes = PostPropsMaxRunes - 40000 // Leave some room for system / pre-save modifications PropsAddChannelMember = "add_channel_member"