Fix Web Bot attachments (#1845)
This commit is contained in:
parent
364352815d
commit
eca1e05379
@ -612,7 +612,7 @@ addActionHandler('openChatByUsername', async (global, actions, payload) => {
|
|||||||
const chat = selectCurrentChat(global);
|
const chat = selectCurrentChat(global);
|
||||||
|
|
||||||
if (!commentId) {
|
if (!commentId) {
|
||||||
if (chat && chat.username === username) {
|
if (chat && chat.username === username && !startAttach) {
|
||||||
actions.focusMessage({ chatId: chat.id, messageId });
|
actions.focusMessage({ chatId: chat.id, messageId });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1340,6 +1340,7 @@ async function openChatByUsername(
|
|||||||
if (!chat) return;
|
if (!chat) return;
|
||||||
const global = getGlobal();
|
const global = getGlobal();
|
||||||
const user = selectUser(global, chat.id);
|
const user = selectUser(global, chat.id);
|
||||||
|
|
||||||
if (!user) return;
|
if (!user) return;
|
||||||
const isBot = isUserBot(user);
|
const isBot = isUserBot(user);
|
||||||
if (!isBot || !user.isAttachMenuBot) {
|
if (!isBot || !user.isAttachMenuBot) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user