Folders: Fix saving excluded peers (#2632)
This commit is contained in:
parent
9acabf2a79
commit
723c0b4924
@ -847,6 +847,11 @@ export async function editChatFolder({
|
|||||||
id: number;
|
id: number;
|
||||||
folderUpdate: ApiChatFolder;
|
folderUpdate: ApiChatFolder;
|
||||||
}) {
|
}) {
|
||||||
|
// Telegram ignores excluded chats if they also present in the included list
|
||||||
|
folderUpdate.excludedChatIds = folderUpdate.excludedChatIds.filter((chatId) => {
|
||||||
|
return !folderUpdate.includedChatIds.includes(chatId);
|
||||||
|
});
|
||||||
|
|
||||||
const filter = buildFilterFromApiFolder(folderUpdate);
|
const filter = buildFilterFromApiFolder(folderUpdate);
|
||||||
|
|
||||||
const isActionSuccessful = await invokeRequest(new GramJs.messages.UpdateDialogFilter({
|
const isActionSuccessful = await invokeRequest(new GramJs.messages.UpdateDialogFilter({
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
import type { StateReducer, Dispatch } from '../useReducer';
|
import type { StateReducer, Dispatch } from '../useReducer';
|
||||||
import useReducer from '../useReducer';
|
|
||||||
import type { ApiChatFolder } from '../../api/types';
|
import type { ApiChatFolder } from '../../api/types';
|
||||||
|
|
||||||
import { pick, omit } from '../../util/iteratees';
|
import { pick, omit } from '../../util/iteratees';
|
||||||
|
import useReducer from '../useReducer';
|
||||||
|
|
||||||
export type FolderChatType = {
|
export type FolderChatType = {
|
||||||
icon: string;
|
icon: string;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user