Channel: Correct handling of changes "Chat history for new members" parameter (#2211)
This commit is contained in:
parent
4309330b2c
commit
dd49420851
@ -769,6 +769,13 @@ addActionHandler('togglePreHistoryHidden', async (global, actions, payload) => {
|
|||||||
actions.openChat({ id: chat.id });
|
actions.openChat({ id: chat.id });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setGlobal(updateChat(global, chat.id, {
|
||||||
|
fullInfo: {
|
||||||
|
...chat.fullInfo,
|
||||||
|
isPreHistoryHidden: isEnabled,
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
void callApi('togglePreHistoryHidden', { chat, isEnabled });
|
void callApi('togglePreHistoryHidden', { chat, isEnabled });
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1043,6 +1050,13 @@ addActionHandler('linkDiscussionGroup', async (global, actions, payload) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fullInfo!.isPreHistoryHidden) {
|
if (fullInfo!.isPreHistoryHidden) {
|
||||||
|
setGlobal(updateChat(global, chat.id, {
|
||||||
|
fullInfo: {
|
||||||
|
...chat.fullInfo,
|
||||||
|
isPreHistoryHidden: false,
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
await callApi('togglePreHistoryHidden', { chat, isEnabled: false });
|
await callApi('togglePreHistoryHidden', { chat, isEnabled: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user