Fixed 267U.pre2

This commit is contained in:
2026-07-26 18:25:37 +09:00
parent 50bfaeafdf
commit 317d00a284
1286 changed files with 80222 additions and 1 deletions
@@ -0,0 +1,20 @@
import config from "../../../../config/index.js";
export class MentionConverter {
static encode(u, m) {
let acct = u.username;
let acctUrl = `https://${u.host || config.host}/@${u.username}`;
let url = null;
if (u.host) {
const info = m.find((r)=>r.username === u.username && r.host === u.host);
acct = `${u.username}@${u.host}`;
acctUrl = `https://${u.host}/@${u.username}`;
if (info) url = info.url ?? info.uri;
}
return {
id: u.id,
username: u.username,
acct: acct,
url: url ?? acctUrl
};
}
}