mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-07 22:44:16 +00:00
fix(discord): prefer names in allowlist resolution logs
This commit is contained in:
@@ -91,6 +91,6 @@ describe("resolveDiscordAllowlistConfig", () => {
|
||||
expect(logs).toContain(
|
||||
"discord channels unresolved: 145/c404 (guild:Ops; channel:missing-room)",
|
||||
);
|
||||
expect(logs).toContain("discord users resolved: 387→387 (name:Peter)");
|
||||
expect(logs).toContain("discord users resolved: 387→Peter (id:387)");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -63,9 +63,11 @@ function formatDiscordChannelUnresolved(entry: DiscordChannelLogEntry): string {
|
||||
}
|
||||
|
||||
function formatDiscordUserResolved(entry: DiscordUserLogEntry): string {
|
||||
const base = `${entry.input}→${entry.id}`;
|
||||
const displayName = entry.name?.trim();
|
||||
const target = displayName || entry.id;
|
||||
const base = `${entry.input}→${target}`;
|
||||
return formatResolutionLogDetails(base, [
|
||||
entry.name ? `name:${entry.name}` : undefined,
|
||||
displayName && entry.id ? `id:${entry.id}` : undefined,
|
||||
entry.guildName ? `guild:${entry.guildName}` : undefined,
|
||||
entry.note,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user