Saved Message: Suppress error CHANNEL_PRIVATE

This commit is contained in:
Alexander Zinchuk 2024-02-23 14:05:48 +01:00
parent c3cc8b634f
commit fa2646d648
3 changed files with 11 additions and 3 deletions

View File

@ -367,7 +367,7 @@ export function fetchStoriesMaxIds({
}) {
return invokeRequest(new GramJs.stories.GetPeerMaxIDs({
id: peers.map((peer) => buildInputPeer(peer.id, peer.accessHash)),
}));
}), { shouldIgnoreErrors: true });
}
async function fetchCommonStoriesRequest({ method, peerId }: {

View File

@ -409,7 +409,11 @@ const HeaderMenuContainer: FC<OwnProps & StateProps> = ({
const deleteTitle = useMemo(() => {
if (!chat) return undefined;
if (isPrivate || savedDialog) {
if (savedDialog) {
return lang('Delete');
}
if (isPrivate) {
return lang('DeleteChatUser');
}

View File

@ -48,7 +48,11 @@ const useChatContextActions = ({
const deleteTitle = useMemo(() => {
if (!chat) return undefined;
if (isUserId(chat.id) || isSavedDialog) {
if (isSavedDialog) {
return lang('Delete');
}
if (isUserId(chat.id)) {
return lang('DeleteChatUser');
}