diff options
Diffstat (limited to 'web/react/stores/socket_store.jsx')
-rw-r--r-- | web/react/stores/socket_store.jsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web/react/stores/socket_store.jsx b/web/react/stores/socket_store.jsx index 4d69a6716..4efeb7c8f 100644 --- a/web/react/stores/socket_store.jsx +++ b/web/react/stores/socket_store.jsx @@ -165,7 +165,7 @@ function handleNewPostEvent(msg) { } // Send desktop notification - if (UserStore.getCurrentId() !== msg.user_id) { + if (UserStore.getCurrentId() !== msg.user_id || post.props.from_webhook === 'true') { const msgProps = msg.props; let mentions = []; @@ -189,7 +189,9 @@ function handleNewPostEvent(msg) { } let username = 'Someone'; - if (UserStore.hasProfile(msg.user_id)) { + if (post.props.override_username && global.window.mm_config.EnablePostUsernameOverride === 'true') { + username = post.props.override_username; + } else if (UserStore.hasProfile(msg.user_id)) { username = UserStore.getProfile(msg.user_id).username; } |