mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Fix GMs showing up on refresh after being hidden (#5702)
This commit is contained in:
committed by
George Goldberg
parent
6ff46f3050
commit
9c13863f48
@@ -286,7 +286,7 @@ func SendNotifications(post *model.Post, team *model.Team, channel *model.Channe
|
||||
message := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_POSTED, "", post.ChannelId, "", nil)
|
||||
message.Add("post", post.ToJson())
|
||||
message.Add("channel_type", channel.Type)
|
||||
message.Add("channel_display_name", channel.DisplayName)
|
||||
message.Add("channel_display_name", channelName)
|
||||
message.Add("channel_name", channel.Name)
|
||||
message.Add("sender_name", senderUsername)
|
||||
message.Add("team_id", team.Id)
|
||||
|
||||
@@ -304,7 +304,7 @@ export function loadProfilesForGM() {
|
||||
|
||||
if (!isVisible) {
|
||||
const member = ChannelStore.getMyMember(channel.id);
|
||||
if (!member || (member.mention_count === 0 && member.msg_count < member.total_msg_count)) {
|
||||
if (!member || (member.mention_count === 0 && member.msg_count >= channel.total_msg_count)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,6 +82,10 @@ class NotificationStoreClass extends EventEmitter {
|
||||
title = channel.display_name;
|
||||
}
|
||||
|
||||
if (title === '') {
|
||||
title = msgProps.channel_display_name;
|
||||
}
|
||||
|
||||
let notifyText = post.message.replace(/\n+/g, ' ');
|
||||
if (notifyText.length > 50) {
|
||||
notifyText = notifyText.substring(0, 49) + '...';
|
||||
|
||||
Reference in New Issue
Block a user