@ascegu/teamily 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/channel.ts +6 -4
package/package.json
CHANGED
package/src/channel.ts
CHANGED
|
@@ -287,14 +287,17 @@ export const teamilyPlugin: ChannelPlugin<ResolvedTeamilyAccount> = {
|
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
+
const replyTarget = isGroup ? `group:${message.recvID}` : from;
|
|
290
291
|
const msgCtx = {
|
|
291
292
|
Body: text,
|
|
292
293
|
From: from,
|
|
293
294
|
To: account.userID,
|
|
294
295
|
SessionKey: sessionKey,
|
|
295
296
|
AccountId: accountId,
|
|
297
|
+
Provider: "teamily" as const,
|
|
298
|
+
Surface: "teamily" as const,
|
|
296
299
|
OriginatingChannel: "teamily" as const,
|
|
297
|
-
OriginatingTo:
|
|
300
|
+
OriginatingTo: replyTarget,
|
|
298
301
|
ChatType: isGroup ? "group" : "direct",
|
|
299
302
|
MediaUrl: mediaUrl,
|
|
300
303
|
MediaPath: mediaPath,
|
|
@@ -311,9 +314,8 @@ export const teamilyPlugin: ChannelPlugin<ResolvedTeamilyAccount> = {
|
|
|
311
314
|
if (replyText) {
|
|
312
315
|
const monitor = getTeamilyMonitor(accountId);
|
|
313
316
|
if (!monitor) throw new Error(`Teamily monitor not running for account ${accountId}`);
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
const target = normalizeTeamilyTarget(replyTo);
|
|
317
|
+
log?.info?.(`[${accountId}] Sending reply to: ${replyTarget} (isGroup=${isGroup})`);
|
|
318
|
+
const target = normalizeTeamilyTarget(replyTarget);
|
|
317
319
|
await monitor.sendText(target, replyText);
|
|
318
320
|
}
|
|
319
321
|
},
|