Skip to content

Add configurable voice-note auto-reply with schedule support#2

Open
Naude555 wants to merge 1 commit intomainfrom
codex/add-auto-reply-configuration-for-voice-notes
Open

Add configurable voice-note auto-reply with schedule support#2
Naude555 wants to merge 1 commit intomainfrom
codex/add-auto-reply-configuration-for-voice-notes

Conversation

@Naude555
Copy link
Copy Markdown
Owner

@Naude555 Naude555 commented Mar 5, 2026

Motivation

  • Provide an automatic response when users send WhatsApp voice notes (PTT), with controls to restrict behavior by DM/group/both and to avoid spamming via cooldowns.
  • Allow time-aware behavior so operators can enable replies only during working hours or leave them always-on.

Description

  • Detect inbound voice notes (audioMessage.ptt) and record them as type: 'voice', logging the event and storing a message record for UI/records.
  • Add a new automations.autoReply.voiceNote config (backed by env vars) with enabled, scope (dm|group|both), text, cooldownMs, and schedule (mode: always|hours, start, end, tz) and wire it into the default automations config.
  • Implement schedule and cooldown checks in shouldSendVoiceNoteAutoReply and enqueue a queued text reply when the rule passes; expose the effective voice-note auto-reply config in the /health response.
  • Document new environment variables in .env.example and README.md so the feature can be configured immediately.

Testing

  • Ran node --check server.js to verify syntax and module correctness, which succeeded.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant