MM-2954 - Add a separate post type for /me messages and update formatting (#11082)
* MM-2954 * Added new const post type for /me commands * Modified me command to return response text without *__* wrapper * Modified unit test for MeCommand to reflect changes * Added unit test for the me command provider * * Reverted change to text property in me command response * Added original message in me command response props * Updated unit tests * gofmt changes
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
a760f32526
Коммит
66993e1fae
@@ -48,6 +48,7 @@ const (
|
||||
POST_PROPS_MAX_RUNES = 8000
|
||||
POST_PROPS_MAX_USER_RUNES = POST_PROPS_MAX_RUNES - 400 // Leave some room for system / pre-save modifications
|
||||
POST_CUSTOM_TYPE_PREFIX = "custom_"
|
||||
POST_ME = "me"
|
||||
PROPS_ADD_CHANNEL_MEMBER = "add_channel_member"
|
||||
POST_PROPS_ADDED_USER_ID = "addedUserId"
|
||||
POST_PROPS_DELETE_BY = "deleteBy"
|
||||
@@ -236,6 +237,7 @@ func (o *Post) IsValid(maxPostSize int) *AppError {
|
||||
POST_CONVERT_CHANNEL,
|
||||
POST_CHANNEL_DELETED,
|
||||
POST_CHANGE_CHANNEL_PRIVACY,
|
||||
POST_ME,
|
||||
POST_ADD_BOT_TEAMS_CHANNELS:
|
||||
default:
|
||||
if !strings.HasPrefix(o.Type, POST_CUSTOM_TYPE_PREFIX) {
|
||||
|
||||
Ссылка в новой задаче
Block a user