|
|
@ -3652,14 +3652,7 @@ export class AppMessagesManager { |
|
|
|
if(!dialog && !isLocalThreadUpdate) { |
|
|
|
if(!dialog && !isLocalThreadUpdate) { |
|
|
|
let good = true; |
|
|
|
let good = true; |
|
|
|
if(peerId < 0) { |
|
|
|
if(peerId < 0) { |
|
|
|
const chat = appChatsManager.getChat(-peerId); |
|
|
|
good = appChatsManager.isInChat(-peerId); |
|
|
|
if(chat._ === 'channelForbidden' |
|
|
|
|
|
|
|
|| chat._ === 'chatForbidden' |
|
|
|
|
|
|
|
|| (chat as Chat.chat).pFlags.left |
|
|
|
|
|
|
|
|| (chat as Chat.chat).pFlags.kicked |
|
|
|
|
|
|
|
|| (chat as Chat.chat).pFlags.deactivated) { |
|
|
|
|
|
|
|
good = false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(good) { |
|
|
|
if(good) { |
|
|
@ -4034,7 +4027,7 @@ export class AppMessagesManager { |
|
|
|
const peerId = -channelId; |
|
|
|
const peerId = -channelId; |
|
|
|
const channel = appChatsManager.getChat(channelId); |
|
|
|
const channel = appChatsManager.getChat(channelId); |
|
|
|
|
|
|
|
|
|
|
|
const needDialog = channel._ === 'channel' && (!channel.pFlags.left && !channel.pFlags.kicked); |
|
|
|
const needDialog = channel._ === 'channel' && appChatsManager.isInChat(channelId); |
|
|
|
const dialog = this.getDialogOnly(peerId); |
|
|
|
const dialog = this.getDialogOnly(peerId); |
|
|
|
|
|
|
|
|
|
|
|
const canViewHistory = channel._ === 'channel' && (channel.username || !channel.pFlags.left && !channel.pFlags.kicked); |
|
|
|
const canViewHistory = channel._ === 'channel' && (channel.username || !channel.pFlags.left && !channel.pFlags.kicked); |
|
|
|