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
```
Этот коммит содержится в:
Agniva De Sarker
2023-02-10 21:41:57 +05:30
коммит произвёл GitHub
родитель c6c170a5ee
Коммит 1cb1d8bd9e
2 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@@ -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) {