merge: Split descriptions. (!1167)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1167 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
commit
07295ad62d
13 changed files with 60 additions and 3 deletions
|
|
@ -75,6 +75,7 @@ export class MetaEntityService {
|
|||
shortName: instance.shortName,
|
||||
uri: this.config.url,
|
||||
description: instance.description,
|
||||
about: instance.about,
|
||||
langs: instance.langs,
|
||||
tosUrl: instance.termsOfServiceUrl,
|
||||
repositoryUrl: instance.repositoryUrl,
|
||||
|
|
|
|||
|
|
@ -43,6 +43,11 @@ export class MiMeta {
|
|||
})
|
||||
public description: string | null;
|
||||
|
||||
@Column('text', {
|
||||
nullable: true,
|
||||
})
|
||||
public about: string | null;
|
||||
|
||||
/**
|
||||
* メンテナの名前
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -43,6 +43,10 @@ export const packedMetaLiteSchema = {
|
|||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
about: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
langs: {
|
||||
type: 'array',
|
||||
optional: false, nullable: false,
|
||||
|
|
|
|||
|
|
@ -664,6 +664,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
shortName: instance.shortName,
|
||||
uri: this.config.url,
|
||||
description: instance.description,
|
||||
about: instance.about,
|
||||
langs: instance.langs,
|
||||
tosUrl: instance.termsOfServiceUrl,
|
||||
repositoryUrl: instance.repositoryUrl,
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ export const paramDef = {
|
|||
name: { type: 'string', nullable: true },
|
||||
shortName: { type: 'string', nullable: true },
|
||||
description: { type: 'string', nullable: true },
|
||||
about: { type: 'string', nullable: true },
|
||||
defaultLightTheme: { type: 'string', nullable: true },
|
||||
defaultDarkTheme: { type: 'string', nullable: true },
|
||||
defaultLike: { type: 'string' },
|
||||
|
|
@ -340,6 +341,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
set.description = ps.description;
|
||||
}
|
||||
|
||||
if (ps.about !== undefined) {
|
||||
set.about = ps.about;
|
||||
}
|
||||
|
||||
if (ps.defaultLightTheme !== undefined) {
|
||||
set.defaultLightTheme = ps.defaultLightTheme;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ export class ApiInstanceMastodon {
|
|||
const response: MastodonEntity.Instance = {
|
||||
uri: this.config.host,
|
||||
title: this.meta.name || 'Sharkey',
|
||||
description: this.meta.description || 'This is a vanilla Sharkey Instance. It doesn\'t seem to have a description.',
|
||||
shortDescription: this.meta.description || 'This is a vanilla Sharkey Instance. It doesn\'t seem to have a description.',
|
||||
description: this.meta.about || 'This is a vanilla Sharkey Instance.',
|
||||
email: instance.email || '',
|
||||
version: `3.0.0 (compatible; Sharkey ${this.config.version}; like Akkoma)`,
|
||||
urls: instance.urls,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue