feat(device): add clientName to DeviceMeta for multi-client display
Add clientName field to DeviceMeta so non-browser clients (Telegram, Discord, etc.) can provide a human-readable label instead of relying on userAgent parsing. Desktop UI now prioritizes clientName over parsed UA string, fixing "Unknown on Unknown" display for Telegram connections. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a94b6e8b1c
commit
d367e77c0a
6 changed files with 17 additions and 7 deletions
|
|
@ -204,7 +204,9 @@ export class TelegramService implements OnModuleInit {
|
|||
connectionInfo.token,
|
||||
{
|
||||
platform: "telegram",
|
||||
userAgent: `Telegram ${telegramUserId} @${msg?.from?.username ?? ""} ${msg?.from?.first_name ?? ""}`.trim(),
|
||||
clientName: msg?.from?.username
|
||||
? `Telegram @${msg.from.username}`
|
||||
: `Telegram ${msg?.from?.first_name ?? telegramUserId}`,
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ export interface DeviceMeta {
|
|||
userAgent?: string;
|
||||
platform?: string;
|
||||
language?: string;
|
||||
clientName?: string;
|
||||
}
|
||||
|
||||
export interface DeviceEntry {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue