fix: remove any casts in backward compat code
This commit is contained in:
committed by
Peter Steinberger
parent
30b4c14296
commit
c928df7237
@@ -1153,9 +1153,15 @@ export async function monitorWebProvider(
|
||||
// Send ack reaction immediately upon message receipt
|
||||
if (msg.id) {
|
||||
const ackConfig = cfg.whatsapp?.ackReaction;
|
||||
// Backward compatibility: support old messages.ackReaction format
|
||||
const legacyEmoji = (cfg.messages as any)?.ackReaction;
|
||||
const legacyScope = (cfg.messages as any)?.ackReactionScope;
|
||||
// Backward compatibility: support old messages.ackReaction format (legacy, undocumented)
|
||||
const messages = cfg.messages as
|
||||
| undefined
|
||||
| (typeof cfg.messages & {
|
||||
ackReaction?: string;
|
||||
ackReactionScope?: string;
|
||||
});
|
||||
const legacyEmoji = messages?.ackReaction;
|
||||
const legacyScope = messages?.ackReactionScope;
|
||||
let emoji = (ackConfig?.emoji ?? "").trim();
|
||||
let directEnabled = ackConfig?.direct ?? true;
|
||||
let groupMode = ackConfig?.group ?? "mentions";
|
||||
|
||||
Reference in New Issue
Block a user