Files
matrix/hookshot/bazarr.js
Jared Vititoe 0e275d725e refactor: replace old bot code with Matrix infra configs and scripts
- Remove obsolete Python bot (Wordle, commands, callbacks, welcome)
- Add hookshot/ — all 11 webhook transformation functions + deploy.sh
- Add cinny/ — config.json and dev-update.sh (nightly dev branch build)
- Add landing/ — matrix.lotusguild.org landing page HTML
- Add systemd/ — livekit-server, draupnir, cinny cron unit files
- Add draupnir/ — production config (access token redacted)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 10:36:51 -04:00

11 lines
627 B
JavaScript

var title = data.title || 'Bazarr';
var msg = data.message || data.body || '';
var type = (data.type || 'info').toLowerCase();
var emoji = type === 'success' ? '✅' : (type === 'warning' ? '⚠️' : (type === 'failure' ? '❌' : '📝'));
var lines = [emoji + ' ' + title];
var htmlParts = ['<b>' + emoji + ' ' + title + '</b>'];
if (msg) {
var msgLines = msg.split(/\r?\n/).filter(function(l){ return l.trim(); });
for (var i = 0; i < msgLines.length; i++) { lines.push(msgLines[i]); htmlParts.push(msgLines[i]); }
}
result = { version: 'v2', plain: lines.join('\n'), html: htmlParts.join('<br>'), msgtype: 'm.notice' };