fix(dashboard): preserve registered room aliases

Stop overwriting the user-registered group/room name with the live Discord
channel name during channel-meta refresh; keep the alias and log the
divergence at debug instead.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
This commit is contained in:
claude-bot
2026-06-01 17:29:19 +09:00
parent 9483d4836f
commit f924db78ed

View File

@@ -51,7 +51,7 @@ import {
mergeClaudeDashboardAccounts,
type UsageRow,
} from './dashboard-usage-rows.js';
import { getAllChats, getAllTasks, updateRegisteredGroupName } from './db.js';
import { getAllChats, getAllTasks } from './db.js';
import type { GroupQueue } from './group-queue.js';
import { logger } from './logger.js';
import { isWatchCiTask } from './task-watch-status.js';
@@ -208,12 +208,10 @@ async function refreshChannelMeta(
if (!meta.name) continue;
const group = opts.roomBindings()[jid];
if (!group || group.name === meta.name) continue;
logger.info(
logger.debug(
{ jid, oldName: group.name, newName: meta.name },
'Syncing group name to Discord channel name',
'Keeping registered group name distinct from Discord channel name',
);
updateRegisteredGroupName(jid, meta.name);
opts.onGroupNameSynced?.(jid, meta.name);
}
} catch (err) {
logger.debug({ err }, 'Failed to refresh channel metadata');