mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-23 00:21:28 +00:00
feat: add per-group emoji toggle and standardized embed titles
This commit is contained in:
parent
49baf63a17
commit
809f89400b
11 changed files with 437 additions and 133 deletions
|
|
@ -69,7 +69,9 @@ export async function dispatchEvent(config: Config, event: WebhookEvent, env: En
|
|||
|
||||
try {
|
||||
const tr = trMap.get(route.lang ?? "en")!;
|
||||
const message = formatEvent(route, event, tr);
|
||||
const group = route.groupId ? groupById.get(route.groupId) : undefined;
|
||||
const showEmoji = group?.emoji !== false;
|
||||
const message = formatEvent(route, event, tr, showEmoji);
|
||||
await sendToChannel(route.target.channelId, message, env, route.target.threadId);
|
||||
await recordSend(env.KV, {
|
||||
ts: Date.now(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue