Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
fun committed Apr 12, 2024
1 parent b9f249b commit 8c25094
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,22 @@ bot.on("message", async (msg) => {
});
});

bot.on("room-join", async (room, inviteeList, inviter) => {
await request("/api/sync/room-join", {
room: { rid: room.id },
inviteeList: inviteeList.map((invitee) => {
return {
wid: invitee.id,
name: invitee.name(),
};
}),
invter: {
wid: inviter.id,
name: inviter.name(),
},
});
});

module.exports = {
start: () => {
bot.start().catch(console.error);
Expand Down

0 comments on commit 8c25094

Please sign in to comment.