refac
This commit is contained in:
@@ -155,6 +155,12 @@
|
||||
const archiveChatHandler = async (id) => {
|
||||
try {
|
||||
await archiveChatById(localStorage.token, id);
|
||||
|
||||
if ($chatId === id) {
|
||||
chatId.set('');
|
||||
window.history.replaceState({}, '', '/');
|
||||
}
|
||||
|
||||
dispatch('change');
|
||||
toast.success($i18n.t('Chat archived.'));
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user