refactor: убрана фильтрация system messages (перенесена в Tracker)

This commit is contained in:
Markov 2026-02-24 23:40:17 +01:00
parent e76e84ffc0
commit c151a69de5

View File

@ -61,20 +61,12 @@ export class EventRouter {
const chatId = data.chat_id as string | undefined; const chatId = data.chat_id as string | undefined;
const taskKey = data.task_key as string | undefined; const taskKey = data.task_key as string | undefined;
// Don't respond to own messages // Don't respond to own messages (safety net — Tracker already filters)
if (authorSlug === this.config.slug) { if (authorSlug === this.config.slug) {
this.log.debug('Ignoring own message'); this.log.debug('Ignoring own message');
return; return;
} }
// System messages: only process if agent is mentioned
if (authorType === 'system') {
if (!content.includes(`@${this.config.slug}`)) {
this.log.debug('Ignoring system message (not mentioned): %s', content.slice(0, 100));
return;
}
}
if (!content) { if (!content) {
this.log.warn({ data }, 'message.new event missing content'); this.log.warn({ data }, 'message.new event missing content');
return; return;