feat(app): show where forward destinations come from (#2950)

This commit is contained in:
Hampus authored and GitHub committed 2026-09-25 13:12:17 +02:00
1 parent 00bf74cef5
commit f4f39e6a89
4 files changed
+184 -66

No files matched your search

@@ -418,6 +418,16 @@ function formatGuildChannelDetail(guild: Guild | undefined, channel: Channel): s
return detail === '' ? null : detail;
}
function formatGroupDMDetail(channel: Channel): string | null {
if (channel.type !== ChannelTypes.GROUP_DM || (channel.name?.trim() ?? '') === '') return null;
const names: Array<string> = [];
for (const recipientId of channel.recipientIds) {
const recipient = Users.getUser(recipientId);
if (recipient != null) names.push(NicknameUtils.getNickname(recipient, null, channel.id));
}
return names.length === 0 ? null : names.join(', ');
}
function resolveGuildChannelDisableReason(
channel: Channel,
guild: Guild | undefined,
@@ -469,7 +479,7 @@ function resolveForwardDestinationOption(
return Object.freeze({
channel,
destination,
detail: null,
detail: formatGroupDMDetail(channel),
disableReason: resolveAgeRestrictedDisableReason(channel, mediaNeeds, i18n),
displayName: ChannelUtils.getDMDisplayName(channel),
key,