Skip to content

Commit

Permalink
chore: test
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Sep 11, 2024
1 parent c7ad4ff commit 97e0b41
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/bot/mtproto-api/workrooms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,6 @@ export async function reopenChat(context: Context<"issues.reopened", SupportedEv
);
}

await mtProto.client.invoke(
new mtProto.api.messages.SendMessage({
message: "This task has been reopened and this chat has been unarchived.",
peer: new mtProto.api.InputPeerChat({ chatId: chat.chatId }),
})
);

// edit ban rights
await mtProto.client.invoke(
new mtProto.api.messages.EditChatDefaultBannedRights({
Expand All @@ -244,6 +237,15 @@ export async function reopenChat(context: Context<"issues.reopened", SupportedEv
})
);

await mtProto.client.invoke(
new mtProto.api.messages.SendMessage({
message: "This task has been reopened and this chat has been unarchived.",
peer: new mtProto.api.InputPeerChat({ chatId: chat.chatId }),
})
);



await chats.updateChatStatus("reopened", payload.issue.node_id);
return { status: 200, reason: "chat_reopened" };
} catch (er) {
Expand Down

0 comments on commit 97e0b41

Please sign in to comment.