mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 08:53:48 +01:00
[mastodon-client] Return fqn field for accounts
This commit is contained in:
parent
9c4466035e
commit
775d8f6e3a
@ -25,6 +25,7 @@ export class UserConverter {
|
|||||||
const cacheHit = cache.accounts.find(p => p.id == u.id);
|
const cacheHit = cache.accounts.find(p => p.id == u.id);
|
||||||
if (cacheHit) return cacheHit;
|
if (cacheHit) return cacheHit;
|
||||||
|
|
||||||
|
let fqn = `${u.username}@${u.host ?? config.domain}`;
|
||||||
let acct = u.username;
|
let acct = u.username;
|
||||||
let acctUrl = `https://${u.host || config.host}/@${u.username}`;
|
let acctUrl = `https://${u.host || config.host}/@${u.username}`;
|
||||||
if (u.host) {
|
if (u.host) {
|
||||||
@ -79,6 +80,7 @@ export class UserConverter {
|
|||||||
id: u.id,
|
id: u.id,
|
||||||
username: u.username,
|
username: u.username,
|
||||||
acct: acct,
|
acct: acct,
|
||||||
|
fqn: fqn,
|
||||||
display_name: u.name || u.username,
|
display_name: u.name || u.username,
|
||||||
locked: u.isLocked,
|
locked: u.isLocked,
|
||||||
created_at: u.createdAt.toISOString(),
|
created_at: u.createdAt.toISOString(),
|
||||||
|
@ -6,6 +6,7 @@ namespace MastodonEntity {
|
|||||||
id: string;
|
id: string;
|
||||||
username: string;
|
username: string;
|
||||||
acct: string;
|
acct: string;
|
||||||
|
fqn: string;
|
||||||
display_name: string;
|
display_name: string;
|
||||||
locked: boolean;
|
locked: boolean;
|
||||||
created_at: string;
|
created_at: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user