PLT-7300: Add use_user_icon prop to allow bots to just use their user icon (#7381)
* add use_user_icon prop to allow bots to just use their user icon * revert unintentional change
Этот коммит содержится в:
@@ -69,8 +69,9 @@ func (p *Plugin) handleWebhook(w http.ResponseWriter, r *http.Request) {
|
|||||||
Type: model.POST_SLACK_ATTACHMENT,
|
Type: model.POST_SLACK_ATTACHMENT,
|
||||||
UserId: user.Id,
|
UserId: user.Id,
|
||||||
Props: map[string]interface{}{
|
Props: map[string]interface{}{
|
||||||
"from_webhook": "true",
|
"from_webhook": "true",
|
||||||
"attachments": []*model.SlackAttachment{attachment},
|
"use_user_icon": "true",
|
||||||
|
"attachments": []*model.SlackAttachment{attachment},
|
||||||
},
|
},
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
http.Error(w, p.api.I18n(err.Message, r), err.StatusCode)
|
http.Error(w, p.api.I18n(err.Message, r), err.StatusCode)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export function getProfilePicSrcForPost(post, user) {
|
|||||||
src = Utils.imageURLForUser(post.user_id);
|
src = Utils.imageURLForUser(post.user_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (post.props && post.props.from_webhook && global.window.mm_config.EnablePostIconOverride === 'true') {
|
if (post.props && post.props.from_webhook && !post.props.use_user_icon && global.window.mm_config.EnablePostIconOverride === 'true') {
|
||||||
if (post.props.override_icon_url) {
|
if (post.props.override_icon_url) {
|
||||||
src = post.props.override_icon_url;
|
src = post.props.override_icon_url;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user