Gift Profile Filter: Support for users (#5650)

This commit is contained in:
Alexander Zinchuk 2025-03-01 17:59:20 +01:00
parent 28419b6354
commit f8b13f48c2

View File

@ -8,6 +8,7 @@ import {
} from '../helpers';
import { selectChat } from './chats';
import { selectTabState } from './tabs';
import { selectUser } from './users';
export function selectPaymentInputInvoice<T extends GlobalState>(
global: T,
@ -76,7 +77,8 @@ export function selectCanUseGiftProfileFilter<T extends GlobalState>(
global: T, peerId: string,
) {
const chat = selectChat(global, peerId);
return chat && isChatChannel(chat);
const user = selectUser(global, peerId);
return Boolean(user) || (chat && isChatChannel(chat));
}
export function selectGiftProfileFilter<T extends GlobalState>(