@automagik/omni 2.260528.1 → 2.260529.1
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/dist/index.js +23 -3
- package/dist/server/index.js +164 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28459,7 +28459,7 @@ function registerSchemas(entries) {
|
|
|
28459
28459
|
eventRegistry.register(entry);
|
|
28460
28460
|
}
|
|
28461
28461
|
}
|
|
28462
|
-
var log2, eventRegistry, SystemEventSchemas;
|
|
28462
|
+
var log2, eventRegistry, SystemEventSchemas, CustomEventSchemas;
|
|
28463
28463
|
var init_registry = __esm(() => {
|
|
28464
28464
|
init_zod();
|
|
28465
28465
|
init_logger();
|
|
@@ -28493,6 +28493,25 @@ var init_registry = __esm(() => {
|
|
|
28493
28493
|
severity: exports_external.enum(["warning", "critical"])
|
|
28494
28494
|
}), { description: "System health degradation detected" })
|
|
28495
28495
|
};
|
|
28496
|
+
CustomEventSchemas = {
|
|
28497
|
+
chatUnreadUpdated: createEventSchema("custom.chat.unread-updated", exports_external.object({
|
|
28498
|
+
chatId: exports_external.string(),
|
|
28499
|
+
unreadCount: exports_external.number()
|
|
28500
|
+
}), { description: "Platform-native chat unread count update" }),
|
|
28501
|
+
contactsNames: createEventSchema("custom.contacts.names", exports_external.object({
|
|
28502
|
+
names: exports_external.array(exports_external.object({
|
|
28503
|
+
jid: exports_external.string(),
|
|
28504
|
+
name: exports_external.string()
|
|
28505
|
+
}))
|
|
28506
|
+
}), { description: "Contact display names discovered by a channel" }),
|
|
28507
|
+
lidMappingBatch: createEventSchema("custom.lid-mapping.batch", exports_external.object({
|
|
28508
|
+
mappings: exports_external.array(exports_external.object({
|
|
28509
|
+
lidJid: exports_external.string(),
|
|
28510
|
+
phoneJid: exports_external.string()
|
|
28511
|
+
}))
|
|
28512
|
+
}), { description: "Batch of WhatsApp LID to phone JID mappings" })
|
|
28513
|
+
};
|
|
28514
|
+
registerSchemas([...Object.values(SystemEventSchemas), ...Object.values(CustomEventSchemas)]);
|
|
28496
28515
|
});
|
|
28497
28516
|
|
|
28498
28517
|
// ../core/src/events/nats/subjects.ts
|
|
@@ -63637,6 +63656,7 @@ __export(exports_src, {
|
|
|
63637
63656
|
DEFAULT_CONSUMER_CONFIG: () => DEFAULT_CONSUMER_CONFIG,
|
|
63638
63657
|
DEFAULT_CACHE_CONFIG: () => DEFAULT_CACHE_CONFIG,
|
|
63639
63658
|
DEBOUNCE_MODES: () => DEBOUNCE_MODES,
|
|
63659
|
+
CustomEventSchemas: () => CustomEventSchemas,
|
|
63640
63660
|
CronExpressions: () => CronExpressions,
|
|
63641
63661
|
CreatePlatformIdentitySchema: () => CreatePlatformIdentitySchema,
|
|
63642
63662
|
CreatePersonSchema: () => CreatePersonSchema,
|
|
@@ -124703,7 +124723,7 @@ import { fileURLToPath } from "url";
|
|
|
124703
124723
|
// package.json
|
|
124704
124724
|
var package_default = {
|
|
124705
124725
|
name: "@automagik/omni",
|
|
124706
|
-
version: "2.
|
|
124726
|
+
version: "2.260529.1",
|
|
124707
124727
|
description: "LLM-optimized CLI for Omni",
|
|
124708
124728
|
type: "module",
|
|
124709
124729
|
bin: {
|
|
@@ -134064,7 +134084,7 @@ function createMessagesCommand() {
|
|
|
134064
134084
|
error("--chat is required");
|
|
134065
134085
|
return;
|
|
134066
134086
|
}
|
|
134067
|
-
const resolvedMessageId = await resolveMessageId(messageId);
|
|
134087
|
+
const resolvedMessageId = await resolveMessageId(messageId, channelId);
|
|
134068
134088
|
const instanceId = await resolveInstanceId(options.instance);
|
|
134069
134089
|
const config2 = (await Promise.resolve().then(() => (init_config(), exports_config))).loadConfig();
|
|
134070
134090
|
const baseUrl = config2.apiUrl ?? "http://localhost:8882";
|
package/dist/server/index.js
CHANGED
|
@@ -22418,7 +22418,12 @@ function createEventSchema(eventType, schema, options) {
|
|
|
22418
22418
|
description: options?.description
|
|
22419
22419
|
};
|
|
22420
22420
|
}
|
|
22421
|
-
|
|
22421
|
+
function registerSchemas(entries) {
|
|
22422
|
+
for (const entry of entries) {
|
|
22423
|
+
eventRegistry.register(entry);
|
|
22424
|
+
}
|
|
22425
|
+
}
|
|
22426
|
+
var log2, eventRegistry, SystemEventSchemas, CustomEventSchemas;
|
|
22422
22427
|
var init_registry = __esm(() => {
|
|
22423
22428
|
init_zod();
|
|
22424
22429
|
init_logger();
|
|
@@ -22452,6 +22457,25 @@ var init_registry = __esm(() => {
|
|
|
22452
22457
|
severity: exports_external.enum(["warning", "critical"])
|
|
22453
22458
|
}), { description: "System health degradation detected" })
|
|
22454
22459
|
};
|
|
22460
|
+
CustomEventSchemas = {
|
|
22461
|
+
chatUnreadUpdated: createEventSchema("custom.chat.unread-updated", exports_external.object({
|
|
22462
|
+
chatId: exports_external.string(),
|
|
22463
|
+
unreadCount: exports_external.number()
|
|
22464
|
+
}), { description: "Platform-native chat unread count update" }),
|
|
22465
|
+
contactsNames: createEventSchema("custom.contacts.names", exports_external.object({
|
|
22466
|
+
names: exports_external.array(exports_external.object({
|
|
22467
|
+
jid: exports_external.string(),
|
|
22468
|
+
name: exports_external.string()
|
|
22469
|
+
}))
|
|
22470
|
+
}), { description: "Contact display names discovered by a channel" }),
|
|
22471
|
+
lidMappingBatch: createEventSchema("custom.lid-mapping.batch", exports_external.object({
|
|
22472
|
+
mappings: exports_external.array(exports_external.object({
|
|
22473
|
+
lidJid: exports_external.string(),
|
|
22474
|
+
phoneJid: exports_external.string()
|
|
22475
|
+
}))
|
|
22476
|
+
}), { description: "Batch of WhatsApp LID to phone JID mappings" })
|
|
22477
|
+
};
|
|
22478
|
+
registerSchemas([...Object.values(SystemEventSchemas), ...Object.values(CustomEventSchemas)]);
|
|
22455
22479
|
});
|
|
22456
22480
|
|
|
22457
22481
|
// ../core/src/events/nats/subjects.ts
|
|
@@ -230268,7 +230292,7 @@ var init_sentry_scrub = __esm(() => {
|
|
|
230268
230292
|
var require_package8 = __commonJS((exports, module) => {
|
|
230269
230293
|
module.exports = {
|
|
230270
230294
|
name: "@omni/api",
|
|
230271
|
-
version: "2.
|
|
230295
|
+
version: "2.260529.1",
|
|
230272
230296
|
type: "module",
|
|
230273
230297
|
exports: {
|
|
230274
230298
|
".": {
|
|
@@ -332836,6 +332860,26 @@ async function waitForRecord(fn, maxMs = 5000, pollMs = 250) {
|
|
|
332836
332860
|
}
|
|
332837
332861
|
return null;
|
|
332838
332862
|
}
|
|
332863
|
+
function awaitMediaCompletion(msgId) {
|
|
332864
|
+
return new Promise((resolvePromise, rejectPromise) => {
|
|
332865
|
+
mediaCompletions.set(msgId, { resolve: resolvePromise, reject: rejectPromise, createdAt: Date.now() });
|
|
332866
|
+
setTimeout(() => {
|
|
332867
|
+
if (mediaCompletions.has(msgId)) {
|
|
332868
|
+
mediaCompletions.delete(msgId);
|
|
332869
|
+
rejectPromise(new Error(`media wait timeout (${MEDIA_WAIT_TIMEOUT_MS}ms)`));
|
|
332870
|
+
}
|
|
332871
|
+
}, MEDIA_WAIT_TIMEOUT_MS);
|
|
332872
|
+
});
|
|
332873
|
+
}
|
|
332874
|
+
async function recoverProcessedMediaAfterTimeout(services, chatRecordId, externalId, column2) {
|
|
332875
|
+
const refreshed = await services.messages.getByExternalId(chatRecordId, externalId);
|
|
332876
|
+
if (!refreshed)
|
|
332877
|
+
return null;
|
|
332878
|
+
const recovered = checkProcessedColumn(refreshed, column2);
|
|
332879
|
+
if (recovered === "pending" || recovered === "error")
|
|
332880
|
+
return null;
|
|
332881
|
+
return recovered;
|
|
332882
|
+
}
|
|
332839
332883
|
async function awaitMediaProcessing(services, instanceId, chatId, externalId, contentType) {
|
|
332840
332884
|
const column2 = getProcessedColumn(contentType);
|
|
332841
332885
|
if (!column2)
|
|
@@ -332865,9 +332909,22 @@ async function awaitMediaProcessing(services, instanceId, chatId, externalId, co
|
|
|
332865
332909
|
const localPath2 = msg.mediaLocalPath ? resolve2(join19(MEDIA_BASE_PATH3, msg.mediaLocalPath)) : null;
|
|
332866
332910
|
return { content: cached.content, localPath: localPath2 };
|
|
332867
332911
|
}
|
|
332868
|
-
|
|
332869
|
-
|
|
332870
|
-
|
|
332912
|
+
let result;
|
|
332913
|
+
try {
|
|
332914
|
+
result = await awaitMediaCompletion(msg.id);
|
|
332915
|
+
} catch (error3) {
|
|
332916
|
+
log94.warn("Media wait timed out, retrying DB read", {
|
|
332917
|
+
instanceId,
|
|
332918
|
+
chatId,
|
|
332919
|
+
externalId,
|
|
332920
|
+
msgId: msg.id,
|
|
332921
|
+
error: String(error3)
|
|
332922
|
+
});
|
|
332923
|
+
const recovered = await recoverProcessedMediaAfterTimeout(services, chat2.id, externalId, column2);
|
|
332924
|
+
if (recovered)
|
|
332925
|
+
return recovered;
|
|
332926
|
+
return MEDIA_WAIT_NULL;
|
|
332927
|
+
}
|
|
332871
332928
|
if (!result.content || result.error)
|
|
332872
332929
|
return MEDIA_WAIT_NULL;
|
|
332873
332930
|
const updated = await services.messages.getByExternalId(chat2.id, externalId);
|
|
@@ -335119,7 +335176,7 @@ async function setupAgentDispatcher(eventBus, services, db2) {
|
|
|
335119
335176
|
log94.info("Agent dispatcher shutdown complete");
|
|
335120
335177
|
};
|
|
335121
335178
|
}
|
|
335122
|
-
var log94, _natsGenieProviderCtor, QUOTED_MESSAGE_MAX_CHARS = 4000, DM_HISTORY_LIMIT = 20, TRANSIENT_DISPATCH_ERROR_PATTERNS, TRANSIENT_DISPATCH_RETRY_DELAYS_MS, CHANNEL_MESSAGE_LIMITS, DEFAULT_MESSAGE_LIMIT = 4000, MEDIA_BASE_PATH3, MEDIA_ICONS, MEDIA_WAIT_NULL, mediaCompletions, mediaResultCache, DEFAULT_SEND_MEDIA_PATH_TYPES, BOT_PREFIX = "\uD83E\uDD16 ", activeStreams, sessionActivityStore, PROC_REACT_START, PROC_REACT_DONE = "\u2705", providerCache, openclawClientPool, nullFilterWarnedInstances, DEFAULT_GATE_MODEL = "gemini-3-flash-preview", GATE_TIMEOUT_MS = 3000, setupAgentResponder;
|
|
335179
|
+
var log94, _natsGenieProviderCtor, QUOTED_MESSAGE_MAX_CHARS = 4000, DM_HISTORY_LIMIT = 20, TRANSIENT_DISPATCH_ERROR_PATTERNS, TRANSIENT_DISPATCH_RETRY_DELAYS_MS, CHANNEL_MESSAGE_LIMITS, DEFAULT_MESSAGE_LIMIT = 4000, MEDIA_BASE_PATH3, MEDIA_ICONS, MEDIA_WAIT_NULL, mediaCompletions, mediaResultCache, MEDIA_WAIT_TIMEOUT_MS = 30000, DEFAULT_SEND_MEDIA_PATH_TYPES, BOT_PREFIX = "\uD83E\uDD16 ", activeStreams, sessionActivityStore, PROC_REACT_START, PROC_REACT_DONE = "\u2705", providerCache, openclawClientPool, nullFilterWarnedInstances, DEFAULT_GATE_MODEL = "gemini-3-flash-preview", GATE_TIMEOUT_MS = 3000, setupAgentResponder;
|
|
335123
335180
|
var init_agent_dispatcher = __esm(() => {
|
|
335124
335181
|
init_src2();
|
|
335125
335182
|
init_src();
|
|
@@ -349960,6 +350017,14 @@ async function verifyMessageInstanceOwnership(services, message2, instanceId) {
|
|
|
349960
350017
|
});
|
|
349961
350018
|
}
|
|
349962
350019
|
}
|
|
350020
|
+
async function resolveChannelMessageId(services, messageId, instanceId) {
|
|
350021
|
+
if (!isUUID(messageId))
|
|
350022
|
+
return messageId;
|
|
350023
|
+
const message2 = await services.messages.getById(messageId);
|
|
350024
|
+
await verifyMessageInstanceOwnership(services, message2, instanceId);
|
|
350025
|
+
log105.debug("Resolved internal UUID to external ID", { messageId, externalId: message2.externalId });
|
|
350026
|
+
return message2.externalId;
|
|
350027
|
+
}
|
|
349963
350028
|
var log105, mediaDownloadLog, messagesRoutes, MIME_BY_EXTENSION, DEFAULT_MIME_BY_MEDIA_TYPE, UUID_REGEX2, MessageSourceSchema, MessageTypeSchema, MessageStatusSchema, DeliveryStatusSchema, listQuerySchema14, createMessageSchema, updateMessageSchema, recordEditSchema, addReactionSchema, removeReactionSchema, updateDeliveryStatusSchema, MentionSchema, sendTextSchema, sendMediaSchema, sendReactionSchema, sendStickerSchema, sendContactSchema, sendLocationSchema, sendHandoffSchema, sendCloseContactSchema, messageRefSchema, _mediaStorageForDownload = null, sendTtsSchema, forwardMessageSchema, sendPresenceSchema, markMessageReadSchema, markBatchReadSchema, sendPollSchema, sendEmbedSchema, editMessageChannelSchema, deleteMessageChannelSchema, starMessageSchema;
|
|
349964
350029
|
var init_messages5 = __esm(() => {
|
|
349965
350030
|
init_dist6();
|
|
@@ -351494,13 +351559,7 @@ var init_messages5 = __esm(() => {
|
|
|
351494
351559
|
recoverable: false
|
|
351495
351560
|
});
|
|
351496
351561
|
}
|
|
351497
|
-
|
|
351498
|
-
if (isUUID(messageId)) {
|
|
351499
|
-
const message2 = await services.messages.getById(messageId);
|
|
351500
|
-
await verifyMessageInstanceOwnership(services, message2, instanceId);
|
|
351501
|
-
resolvedMessageId = message2.externalId;
|
|
351502
|
-
log105.debug("Resolved internal UUID to external ID", { messageId, externalId: resolvedMessageId });
|
|
351503
|
-
}
|
|
351562
|
+
const resolvedMessageId = await resolveChannelMessageId(services, messageId, instanceId);
|
|
351504
351563
|
try {
|
|
351505
351564
|
await plugin7.editMessage(instanceId, channelId, resolvedMessageId, text3);
|
|
351506
351565
|
} catch (error3) {
|
|
@@ -351556,10 +351615,11 @@ var init_messages5 = __esm(() => {
|
|
|
351556
351615
|
recoverable: false
|
|
351557
351616
|
});
|
|
351558
351617
|
}
|
|
351559
|
-
await
|
|
351618
|
+
const resolvedMessageId = await resolveChannelMessageId(services, messageId, instanceId);
|
|
351619
|
+
await plugin7.deleteMessage(instanceId, channelId, resolvedMessageId, fromMe);
|
|
351560
351620
|
return c.json({
|
|
351561
351621
|
success: true,
|
|
351562
|
-
data: { messageId, deleted: true }
|
|
351622
|
+
data: { messageId, externalId: resolvedMessageId, deleted: true }
|
|
351563
351623
|
});
|
|
351564
351624
|
});
|
|
351565
351625
|
starMessageSchema = exports_external.object({
|
|
@@ -476573,6 +476633,7 @@ function processLidMappings(data, plugin6, instanceId) {
|
|
|
476573
476633
|
}
|
|
476574
476634
|
}
|
|
476575
476635
|
function setupAllEventHandlers2(sock, plugin6, instanceId) {
|
|
476636
|
+
const onReadOnlyEvent = sock.ev.on.bind(sock.ev);
|
|
476576
476637
|
sock.ev.on("call", (calls) => {
|
|
476577
476638
|
for (const call of calls) {
|
|
476578
476639
|
const { id: from } = fromJid(call.from);
|
|
@@ -476611,6 +476672,12 @@ function setupAllEventHandlers2(sock, plugin6, instanceId) {
|
|
|
476611
476672
|
logEvent("chats.delete", { chatIds });
|
|
476612
476673
|
plugin6.handleChatsDelete(instanceId, chatIds);
|
|
476613
476674
|
});
|
|
476675
|
+
onReadOnlyEvent("chats.lock", (update) => {
|
|
476676
|
+
waLog.info("Chat lock update", { chatId: update.id, locked: update.locked });
|
|
476677
|
+
if (DEBUG)
|
|
476678
|
+
logEvent("chats.lock", update);
|
|
476679
|
+
plugin6.handleChatLockUpdate(instanceId, update);
|
|
476680
|
+
});
|
|
476614
476681
|
sock.ev.on("contacts.upsert", (contacts) => {
|
|
476615
476682
|
if (DEBUG)
|
|
476616
476683
|
logEvent("contacts.upsert", { count: contacts.length, contacts });
|
|
@@ -476647,6 +476714,16 @@ function setupAllEventHandlers2(sock, plugin6, instanceId) {
|
|
|
476647
476714
|
logEvent("group.join-request", request);
|
|
476648
476715
|
plugin6.handleGroupJoinRequest(instanceId, request);
|
|
476649
476716
|
});
|
|
476717
|
+
onReadOnlyEvent("group.member-tag.update", (update) => {
|
|
476718
|
+
waLog.info("Group member tag update", {
|
|
476719
|
+
groupId: update.groupId,
|
|
476720
|
+
participant: update.participant,
|
|
476721
|
+
label: update.label
|
|
476722
|
+
});
|
|
476723
|
+
if (DEBUG)
|
|
476724
|
+
logEvent("group.member-tag.update", update);
|
|
476725
|
+
plugin6.handleGroupMemberTagUpdate(instanceId, update);
|
|
476726
|
+
});
|
|
476650
476727
|
sock.ev.on("message-receipt.update", (updates) => {
|
|
476651
476728
|
for (const update of updates) {
|
|
476652
476729
|
if (DEBUG) {
|
|
@@ -476665,6 +476742,15 @@ function setupAllEventHandlers2(sock, plugin6, instanceId) {
|
|
|
476665
476742
|
plugin6.handleMediaUpdate(instanceId, update);
|
|
476666
476743
|
}
|
|
476667
476744
|
});
|
|
476745
|
+
onReadOnlyEvent("message-capping.update", (info) => {
|
|
476746
|
+
waLog.info("Message capping update", {
|
|
476747
|
+
type: info && typeof info === "object" ? info.type : undefined,
|
|
476748
|
+
reason: info && typeof info === "object" ? info.reason : undefined
|
|
476749
|
+
});
|
|
476750
|
+
if (DEBUG)
|
|
476751
|
+
logEvent("message-capping.update", info);
|
|
476752
|
+
plugin6.handleMessageCappingUpdate(instanceId, info);
|
|
476753
|
+
});
|
|
476668
476754
|
sock.ev.on("messaging-history.set", async (history3) => {
|
|
476669
476755
|
const { chats, contacts, messages: messages2, progress, syncType } = history3;
|
|
476670
476756
|
waLog.info("History sync", {
|
|
@@ -476684,6 +476770,16 @@ function setupAllEventHandlers2(sock, plugin6, instanceId) {
|
|
|
476684
476770
|
});
|
|
476685
476771
|
await plugin6.handleHistorySync(instanceId, history3);
|
|
476686
476772
|
});
|
|
476773
|
+
onReadOnlyEvent("messaging-history.status", (status) => {
|
|
476774
|
+
waLog.info("History sync status", {
|
|
476775
|
+
syncType: status.syncType,
|
|
476776
|
+
status: status.status,
|
|
476777
|
+
explicit: status.explicit
|
|
476778
|
+
});
|
|
476779
|
+
if (DEBUG)
|
|
476780
|
+
logEvent("messaging-history.status", status);
|
|
476781
|
+
plugin6.handleMessagingHistoryStatus(instanceId, status);
|
|
476782
|
+
});
|
|
476687
476783
|
sock.ev.on("blocklist.set", (data) => {
|
|
476688
476784
|
waLog.info("Blocklist set", { count: data.blocklist.length });
|
|
476689
476785
|
if (DEBUG)
|
|
@@ -476696,6 +476792,12 @@ function setupAllEventHandlers2(sock, plugin6, instanceId) {
|
|
|
476696
476792
|
logEvent("blocklist.update", data);
|
|
476697
476793
|
plugin6.handleBlocklistUpdate(instanceId, data.blocklist, data.type);
|
|
476698
476794
|
});
|
|
476795
|
+
onReadOnlyEvent("settings.update", (update) => {
|
|
476796
|
+
waLog.info("Settings update", { setting: update.setting });
|
|
476797
|
+
if (DEBUG)
|
|
476798
|
+
logEvent("settings.update", update);
|
|
476799
|
+
plugin6.handleSettingsUpdate(instanceId, update);
|
|
476800
|
+
});
|
|
476699
476801
|
sock.ev.on("labels.edit", (label) => {
|
|
476700
476802
|
if (DEBUG)
|
|
476701
476803
|
logEvent("labels.edit", label);
|
|
@@ -480422,6 +480524,53 @@ class WhatsAppPlugin extends BaseChannelPlugin {
|
|
|
480422
480524
|
async emitMediaReceivedInternal(params) {
|
|
480423
480525
|
await this.emitMediaReceived(params);
|
|
480424
480526
|
}
|
|
480527
|
+
whatsappEventMeta(instanceId, suffix) {
|
|
480528
|
+
return {
|
|
480529
|
+
instanceId,
|
|
480530
|
+
channelType: this.id,
|
|
480531
|
+
source: `channel:${this.id}`,
|
|
480532
|
+
correlationId: `${suffix}-${instanceId}`
|
|
480533
|
+
};
|
|
480534
|
+
}
|
|
480535
|
+
handleMessagingHistoryStatus(instanceId, status) {
|
|
480536
|
+
this.eventBus.publishGeneric("custom.whatsapp.messaging-history-status", {
|
|
480537
|
+
instanceId,
|
|
480538
|
+
syncType: status.syncType,
|
|
480539
|
+
status: status.status ?? "unknown",
|
|
480540
|
+
explicit: status.explicit,
|
|
480541
|
+
timestamp: Date.now()
|
|
480542
|
+
}, this.whatsappEventMeta(instanceId, "history-status")).catch((err) => this.logger.warn("Failed to publish messaging history status", { error: String(err) }));
|
|
480543
|
+
}
|
|
480544
|
+
handleMessageCappingUpdate(instanceId, info) {
|
|
480545
|
+
this.eventBus.publishGeneric("custom.whatsapp.message-capping-updated", { instanceId, info, timestamp: Date.now() }, this.whatsappEventMeta(instanceId, "message-capping")).catch((err) => this.logger.warn("Failed to publish message capping update", { error: String(err) }));
|
|
480546
|
+
}
|
|
480547
|
+
handleSettingsUpdate(instanceId, update) {
|
|
480548
|
+
this.eventBus.publishGeneric("custom.whatsapp.settings-updated", {
|
|
480549
|
+
instanceId,
|
|
480550
|
+
setting: update.setting ?? "unknown",
|
|
480551
|
+
value: update.value,
|
|
480552
|
+
timestamp: Date.now()
|
|
480553
|
+
}, this.whatsappEventMeta(instanceId, `settings-${update.setting ?? "unknown"}`)).catch((err) => this.logger.warn("Failed to publish settings update", { error: String(err) }));
|
|
480554
|
+
}
|
|
480555
|
+
handleChatLockUpdate(instanceId, update) {
|
|
480556
|
+
this.eventBus.publishGeneric("custom.whatsapp.chat-lock-updated", {
|
|
480557
|
+
instanceId,
|
|
480558
|
+
chatId: update.id ?? "",
|
|
480559
|
+
locked: update.locked ?? false,
|
|
480560
|
+
timestamp: Date.now()
|
|
480561
|
+
}, this.whatsappEventMeta(instanceId, `chat-lock-${update.id ?? "unknown"}`)).catch((err) => this.logger.warn("Failed to publish chat lock update", { error: String(err) }));
|
|
480562
|
+
}
|
|
480563
|
+
handleGroupMemberTagUpdate(instanceId, update) {
|
|
480564
|
+
this.eventBus.publishGeneric("custom.whatsapp.group-member-tag-updated", {
|
|
480565
|
+
instanceId,
|
|
480566
|
+
groupId: update.groupId ?? "",
|
|
480567
|
+
participant: update.participant ?? "",
|
|
480568
|
+
participantAlt: update.participantAlt,
|
|
480569
|
+
label: update.label ?? "",
|
|
480570
|
+
messageTimestamp: update.messageTimestamp,
|
|
480571
|
+
timestamp: Date.now()
|
|
480572
|
+
}, this.whatsappEventMeta(instanceId, `group-member-tag-${update.groupId ?? "unknown"}`)).catch((err) => this.logger.warn("Failed to publish group member tag update", { error: String(err) }));
|
|
480573
|
+
}
|
|
480425
480574
|
handleCallReceived(instanceId, callId, from, callType, status, _rawCall) {
|
|
480426
480575
|
this.logger.info("Call received", { instanceId, callId, from, callType, status });
|
|
480427
480576
|
}
|