fix(dashboard): preserve registered room aliases

This commit is contained in:
Codex
2026-05-29 18:47:46 +09:00
parent 85085e2782
commit cdb59ce9fe

View File

@@ -48,7 +48,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';
@@ -200,12 +200,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');