mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Render "client" tags in statuses even if they don't have an application handler event
This commit is contained in:
parent
0abee76e38
commit
621d92dcf6
1 changed files with 9 additions and 1 deletions
|
|
@ -123,7 +123,7 @@ async function renderStatus(
|
||||||
if (event.client) {
|
if (event.client) {
|
||||||
const result = n.json().pipe(n.metadata()).safeParse(event.client.content);
|
const result = n.json().pipe(n.metadata()).safeParse(event.client.content);
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
const name = result.data.name ?? result.data.display_name ?? event.tags.find(([name]) => name === 'client')?.[1];
|
const name = result.data.name ?? event.tags.find(([name]) => name === 'client')?.[1];
|
||||||
if (name) {
|
if (name) {
|
||||||
application = {
|
application = {
|
||||||
name,
|
name,
|
||||||
|
|
@ -131,6 +131,14 @@ async function renderStatus(
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
const name = event.tags.find(([name]) => name === 'client')?.[1];
|
||||||
|
if (name) {
|
||||||
|
application = {
|
||||||
|
name,
|
||||||
|
website: null,
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const expiresAt = new Date(Number(event.tags.find(([name]) => name === 'expiration')?.[1]) * 1000);
|
const expiresAt = new Date(Number(event.tags.find(([name]) => name === 'expiration')?.[1]) * 1000);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue