PLT-5225 Added separate post types for certain system messages (#5193)
* Added separate post types for system_join_leave and system_add_remove posts * Added username prop to channel deleted posts * Changed slack import to properly generate the new join/leave messages * Added username prop to channel update posts * Moved Post(AddTo/RemoveFrom)ChanneMessage into app package
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
097289f8e4
Коммит
65b76c2712
@@ -307,12 +307,23 @@ func SlackAddPosts(teamId string, channel *model.Channel, posts []SlackPost, use
|
||||
l4g.Debug(utils.T("api.slackimport.slack_add_posts.user_no_exists.debug"), sPost.User)
|
||||
continue
|
||||
}
|
||||
|
||||
var postType string
|
||||
if sPost.SubType == "channel_join" {
|
||||
postType = model.POST_JOIN_CHANNEL
|
||||
} else {
|
||||
postType = model.POST_LEAVE_CHANNEL
|
||||
}
|
||||
|
||||
newPost := model.Post{
|
||||
UserId: users[sPost.User].Id,
|
||||
ChannelId: channel.Id,
|
||||
Message: sPost.Text,
|
||||
CreateAt: SlackConvertTimeStamp(sPost.TimeStamp),
|
||||
Type: model.POST_JOIN_LEAVE,
|
||||
Type: postType,
|
||||
Props: model.StringInterface{
|
||||
"username": users[sPost.User].Username,
|
||||
},
|
||||
}
|
||||
ImportPost(&newPost)
|
||||
case sPost.Type == "message" && sPost.SubType == "me_message":
|
||||
|
||||
Ссылка в новой задаче
Block a user