Bot Buttons: Follow-up (#2496)
This commit is contained in:
parent
16efb72773
commit
6ed460c1e5
@ -62,6 +62,7 @@ import {
|
|||||||
isChatAdmin,
|
isChatAdmin,
|
||||||
isChatSuperGroup,
|
isChatSuperGroup,
|
||||||
isChatChannel,
|
isChatChannel,
|
||||||
|
isUserId,
|
||||||
} from '../../../global/helpers';
|
} from '../../../global/helpers';
|
||||||
import { formatMediaDuration, formatVoiceRecordDuration } from '../../../util/dateFormat';
|
import { formatMediaDuration, formatVoiceRecordDuration } from '../../../util/dateFormat';
|
||||||
import focusEditableElement from '../../../util/focusEditableElement';
|
import focusEditableElement from '../../../util/focusEditableElement';
|
||||||
@ -1526,7 +1527,9 @@ export default memo(withGlobal<OwnProps>(
|
|||||||
const chatBot = chatId !== REPLIES_USER_ID ? selectChatBot(global, chatId) : undefined;
|
const chatBot = chatId !== REPLIES_USER_ID ? selectChatBot(global, chatId) : undefined;
|
||||||
const isChatWithBot = Boolean(chatBot);
|
const isChatWithBot = Boolean(chatBot);
|
||||||
const isChatWithSelf = selectIsChatWithSelf(global, chatId);
|
const isChatWithSelf = selectIsChatWithSelf(global, chatId);
|
||||||
const messageWithActualBotKeyboard = selectNewestMessageWithBotKeyboardButtons(global, chatId, threadId);
|
const isChatWithUser = isUserId(chatId);
|
||||||
|
const messageWithActualBotKeyboard = (isChatWithBot || !isChatWithUser)
|
||||||
|
&& selectNewestMessageWithBotKeyboardButtons(global, chatId, threadId);
|
||||||
const scheduledIds = selectScheduledIds(global, chatId, threadId);
|
const scheduledIds = selectScheduledIds(global, chatId, threadId);
|
||||||
const { language, shouldSuggestStickers, shouldSuggestCustomEmoji } = global.settings.byKey;
|
const { language, shouldSuggestStickers, shouldSuggestCustomEmoji } = global.settings.byKey;
|
||||||
const baseEmojiKeywords = global.emojiKeywords[BASE_EMOJI_KEYWORD_LANG];
|
const baseEmojiKeywords = global.emojiKeywords[BASE_EMOJI_KEYWORD_LANG];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user