Fix GMs showing up on refresh after being hidden (#5702)
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
6ff46f3050
Коммит
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) + '...';
|
||||
|
||||
Ссылка в новой задаче
Block a user