Skip to content

Commit

Permalink
chore: test
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Sep 8, 2024
1 parent 8f47fb7 commit d8f7f7b
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/bot/mtproto-api/workrooms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@ export async function createChat(context: Context<"issues.labeled", SupportedEve
}

await context.adapters.supabase.chats.saveChat(chatId, payload.issue.title, payload.issue.node_id);

try {
await mtProto.client.invoke(
new mtProto.api.messages.AddChatUser({
chatId: chatIdBigInt,
userId: new mtProto.api.PeerUser({ userId: bigInt(context.config.botId) }),
fwdLimit: 1,
})
);
} catch (er) {
console.log(`Failed to add bot to chat: `, er);
throw new Error("Failed to add bot to chat");
}

return { status: 200, reason: "chat_created" };
}

Expand Down

0 comments on commit d8f7f7b

Please sign in to comment.