From a1bb81f3395a47140fba90bbd495f9c14e46177c Mon Sep 17 00:00:00 2001 From: Keyrxng <106303466+Keyrxng@users.noreply.github.com> Date: Wed, 11 Sep 2024 16:41:53 +0100 Subject: [PATCH] chore: test --- src/adapters/supabase/helpers/chats.ts | 3 ++- src/bot/mtproto-api/workrooms.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/adapters/supabase/helpers/chats.ts b/src/adapters/supabase/helpers/chats.ts index fbcc0b2..775379b 100644 --- a/src/adapters/supabase/helpers/chats.ts +++ b/src/adapters/supabase/helpers/chats.ts @@ -18,7 +18,8 @@ export class Chats extends Super { } async userSnapshot(chatId: number, userIds: number[]) { - const { error } = await this.supabase.from("chats").upsert({ chatId, userIds }) + const chat = await this.getChatByChatId(chatId); + const { error } = await this.supabase.from("chats").upsert({ ...chat, userIds }) if (error) { this.context.logger.error("Failed to save chat users", { chatId, userIds, er: error }); } else { diff --git a/src/bot/mtproto-api/workrooms.ts b/src/bot/mtproto-api/workrooms.ts index 54ec6fd..7fbf493 100644 --- a/src/bot/mtproto-api/workrooms.ts +++ b/src/bot/mtproto-api/workrooms.ts @@ -11,7 +11,7 @@ function isPriceLabelChange(label: string): boolean { export async function createChat(context: Context<"issues.labeled", SupportedEvents["issues.labeled"]>): Promise { const { payload, config, logger } = context; - const chatName = payload.repository.full_name + "#" + payload.issue.number; + const chatName = "@" + payload.repository.full_name + "#" + payload.issue.number; const labelName = payload.label?.name;