Add additional metadata to post reminder (#22306)
The webapp needs to construct the full message because the team_name needs to be inserted into the permalink. So we need to send everything in the metadata for the client to construct the message. Also, we set a custom post type for the client to easily add a custom condition. ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c6c170a5ee
Коммит
1cb1d8bd9e
@@ -2170,10 +2170,12 @@ func (a *App) CheckPostReminders() {
|
||||
"PostId": postID,
|
||||
"Username": metadata.Username,
|
||||
}),
|
||||
Type: model.PostTypeDefault,
|
||||
Type: model.PostTypeReminder,
|
||||
UserId: systemBot.UserId,
|
||||
Props: model.StringInterface{
|
||||
"username": systemBot.Username,
|
||||
"team_name": metadata.TeamName,
|
||||
"post_id": postID,
|
||||
"username": metadata.Username,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -415,6 +415,7 @@ func (o *Post) IsValid(maxPostSize int) *AppError {
|
||||
PostTypeAddBotTeamsChannels,
|
||||
PostTypeSystemWarnMetricStatus,
|
||||
PostTypeWelcomePost,
|
||||
PostTypeReminder,
|
||||
PostTypeMe:
|
||||
default:
|
||||
if !strings.HasPrefix(o.Type, PostCustomTypePrefix) {
|
||||
|
||||
Ссылка в новой задаче
Block a user