initial link attributions work.
This commit is contained in:
parent
e59a3ad693
commit
ca32c231d0
16 changed files with 228 additions and 3 deletions
|
|
@ -613,6 +613,7 @@ export class ApRendererService {
|
|||
enableRss: user.enableRss,
|
||||
speakAsCat: user.speakAsCat,
|
||||
attachment: attachment.length ? attachment : undefined,
|
||||
attributionDomains: user.attributionDomains,
|
||||
};
|
||||
|
||||
if (user.movedToUri) {
|
||||
|
|
|
|||
|
|
@ -546,6 +546,10 @@ const extension_context_definition = {
|
|||
featured: 'toot:featured',
|
||||
discoverable: 'toot:discoverable',
|
||||
indexable: 'toot:indexable',
|
||||
attributionDomains: {
|
||||
'@id': 'toot:attributionDomains',
|
||||
'@type': '@id',
|
||||
},
|
||||
// schema
|
||||
schema: 'http://schema.org#',
|
||||
PropertyValue: 'schema:PropertyValue',
|
||||
|
|
|
|||
|
|
@ -433,6 +433,7 @@ export class ApPersonService implements OnModuleInit, OnApplicationShutdown {
|
|||
makeNotesFollowersOnlyBefore: (person as any).makeNotesFollowersOnlyBefore ?? null,
|
||||
makeNotesHiddenBefore: (person as any).makeNotesHiddenBefore ?? null,
|
||||
emojis,
|
||||
attributionDomains: (person as any).attributionDomains,
|
||||
})) as MiRemoteUser;
|
||||
|
||||
let _description: string | null = null;
|
||||
|
|
@ -616,6 +617,7 @@ export class ApPersonService implements OnModuleInit, OnApplicationShutdown {
|
|||
// We use "!== false" to handle incorrect types, missing / null values, and "default to true" logic.
|
||||
hideOnlineStatus: person.hideOnlineStatus !== false,
|
||||
isExplorable: person.discoverable !== false,
|
||||
attributionDomains: person.attributionDomains,
|
||||
...(await this.resolveAvatarAndBanner(exist, person.icon, person.image, person.backgroundUrl).catch(() => ({}))),
|
||||
} as Partial<MiRemoteUser> & Pick<MiRemoteUser, 'isBot' | 'isCat' | 'speakAsCat' | 'isLocked' | 'movedToUri' | 'alsoKnownAs' | 'isExplorable'>;
|
||||
|
||||
|
|
|
|||
|
|
@ -255,6 +255,7 @@ export interface IActor extends IObject {
|
|||
enableRss?: boolean;
|
||||
listenbrainz?: string;
|
||||
backgroundUrl?: string;
|
||||
attributionDomains?: string[];
|
||||
}
|
||||
|
||||
export const isCollection = (object: IObject): object is ICollection =>
|
||||
|
|
|
|||
|
|
@ -603,6 +603,7 @@ export class UserEntityService implements OnModuleInit {
|
|||
enableRss: user.enableRss,
|
||||
mandatoryCW: user.mandatoryCW,
|
||||
rejectQuotes: user.rejectQuotes,
|
||||
attributionDomains: user.attributionDomains,
|
||||
isSilenced: user.isSilenced || this.roleService.getUserPolicies(user.id).then(r => !r.canPublicNote),
|
||||
speakAsCat: user.speakAsCat ?? false,
|
||||
approved: user.approved,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue