From 27d5e0658509c0d4e061a2816f48e059e6b1fe47 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 5 Dec 2020 10:23:15 +0000 Subject: [PATCH] Fix replies via user token --- src/vk.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vk.ts b/src/vk.ts index f34ce7c..12061df 100755 --- a/src/vk.ts +++ b/src/vk.ts @@ -178,7 +178,7 @@ export class VkPuppet { try { await client.updates.start(); } catch (err) { - log.error("Failed to initialize update listener", err) + log.error("Failed to initialize update listener", err); } } @@ -303,7 +303,7 @@ export class VkPuppet { message: asUser ? `${asUser.displayname}: ${await this.stripReply(data.body)}` : await this.stripReply(data.body), random_id: new Date().getTime(), forward: p.data.isUserToken ? undefined : `{"peer_id":${Number(room.roomId)},"conversation_message_ids":${Number(eventId)},"is_reply": true}`, - reply_to: p.data.isUserToken ? Number(room.roomId) : undefined, + reply_to: p.data.isUserToken ? Number(eventId) : undefined, }); await this.puppet.eventSync.insert(room, data.eventId!, p.data.isUserToken ? response[0]["message_id"].toString() : response[0]["conversation_message_id"].toString());