cleanup: remove clawd/openclaw references, fix permissions, add architecture docs
- Replace all ~/clawd and ~/.clawdbot paths with ~/echo-core equivalents in tools (git_commit, ralph_prd_generator, backup_config, lead-gen) - Update personality files: TOOLS.md repo/paths, AGENTS.md security audit cmd - Migrate HANDOFF.md architectural decisions to docs/architecture.md - Tighten credentials/ dir to 700, add to .gitignore - Add .claude/ and *.pid to .gitignore - Various adapter, router, and session improvements from prior work Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -158,6 +158,27 @@ app.post('/send', async (req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
app.post('/react', async (req, res) => {
|
||||
const { to, id, emoji, fromMe, participant } = req.body || {};
|
||||
|
||||
if (!to || !id || emoji == null) {
|
||||
return res.status(400).json({ ok: false, error: 'missing "to", "id", or "emoji" in body' });
|
||||
}
|
||||
if (!connected || !sock) {
|
||||
return res.status(503).json({ ok: false, error: 'not connected to WhatsApp' });
|
||||
}
|
||||
|
||||
try {
|
||||
const key = { remoteJid: to, id, fromMe: fromMe || false };
|
||||
if (participant) key.participant = participant;
|
||||
await sock.sendMessage(to, { react: { text: emoji, key } });
|
||||
res.json({ ok: true });
|
||||
} catch (err) {
|
||||
console.error('[whatsapp] React failed:', err.message);
|
||||
res.status(500).json({ ok: false, error: err.message });
|
||||
}
|
||||
});
|
||||
|
||||
app.get('/messages', (_req, res) => {
|
||||
const messages = messageQueue.splice(0);
|
||||
res.json({ messages });
|
||||
|
||||
Reference in New Issue
Block a user