Gift Profile Filter: Support for users (#5650)
This commit is contained in:
parent
28419b6354
commit
f8b13f48c2
@ -8,6 +8,7 @@ import {
|
|||||||
} from '../helpers';
|
} from '../helpers';
|
||||||
import { selectChat } from './chats';
|
import { selectChat } from './chats';
|
||||||
import { selectTabState } from './tabs';
|
import { selectTabState } from './tabs';
|
||||||
|
import { selectUser } from './users';
|
||||||
|
|
||||||
export function selectPaymentInputInvoice<T extends GlobalState>(
|
export function selectPaymentInputInvoice<T extends GlobalState>(
|
||||||
global: T,
|
global: T,
|
||||||
@ -76,7 +77,8 @@ export function selectCanUseGiftProfileFilter<T extends GlobalState>(
|
|||||||
global: T, peerId: string,
|
global: T, peerId: string,
|
||||||
) {
|
) {
|
||||||
const chat = selectChat(global, peerId);
|
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>(
|
export function selectGiftProfileFilter<T extends GlobalState>(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user