mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2025-01-01 08:26:14 +01:00
federate hideOnlineStatus
This commit is contained in:
parent
b7a6ccfef9
commit
5af8432725
4 changed files with 7 additions and 0 deletions
|
@ -528,6 +528,7 @@ export class ApRendererService {
|
||||||
discoverable: user.isExplorable,
|
discoverable: user.isExplorable,
|
||||||
publicKey: this.renderKey(user, keypair, '#main-key'),
|
publicKey: this.renderKey(user, keypair, '#main-key'),
|
||||||
isCat: user.isCat,
|
isCat: user.isCat,
|
||||||
|
hideOnlineStatus: user.hideOnlineStatus,
|
||||||
noindex: user.noindex,
|
noindex: user.noindex,
|
||||||
indexable: !user.noindex,
|
indexable: !user.noindex,
|
||||||
speakAsCat: user.speakAsCat,
|
speakAsCat: user.speakAsCat,
|
||||||
|
|
|
@ -564,6 +564,7 @@ const extension_context_definition = {
|
||||||
speakAsCat: 'firefish:speakAsCat',
|
speakAsCat: 'firefish:speakAsCat',
|
||||||
// Sharkey
|
// Sharkey
|
||||||
sharkey: 'https://joinsharkey.org/ns#',
|
sharkey: 'https://joinsharkey.org/ns#',
|
||||||
|
hideOnlineStatus: 'sharkey:hideOnlineStatus',
|
||||||
backgroundUrl: 'sharkey:backgroundUrl',
|
backgroundUrl: 'sharkey:backgroundUrl',
|
||||||
listenbrainz: 'sharkey:listenbrainz',
|
listenbrainz: 'sharkey:listenbrainz',
|
||||||
// vcard
|
// vcard
|
||||||
|
|
|
@ -389,6 +389,8 @@ export class ApPersonService implements OnModuleInit {
|
||||||
movedToUri: person.movedTo,
|
movedToUri: person.movedTo,
|
||||||
movedAt: person.movedTo ? new Date() : null,
|
movedAt: person.movedTo ? new Date() : null,
|
||||||
alsoKnownAs: person.alsoKnownAs,
|
alsoKnownAs: person.alsoKnownAs,
|
||||||
|
// We use "!== false" to handle incorrect types, missing / null values, and "default to true" logic.
|
||||||
|
hideOnlineStatus: person.hideOnlineStatus !== false,
|
||||||
isExplorable: person.discoverable,
|
isExplorable: person.discoverable,
|
||||||
username: person.preferredUsername,
|
username: person.preferredUsername,
|
||||||
approved: true,
|
approved: true,
|
||||||
|
@ -585,6 +587,8 @@ export class ApPersonService implements OnModuleInit {
|
||||||
isLocked: person.manuallyApprovesFollowers,
|
isLocked: person.manuallyApprovesFollowers,
|
||||||
movedToUri: person.movedTo ?? null,
|
movedToUri: person.movedTo ?? null,
|
||||||
alsoKnownAs: person.alsoKnownAs ?? null,
|
alsoKnownAs: person.alsoKnownAs ?? null,
|
||||||
|
// We use "!== false" to handle incorrect types, missing / null values, and "default to true" logic.
|
||||||
|
hideOnlineStatus: person.hideOnlineStatus !== false,
|
||||||
isExplorable: person.discoverable,
|
isExplorable: person.discoverable,
|
||||||
...(await this.resolveAvatarAndBanner(exist, person.icon, person.image, person.backgroundUrl).catch(() => ({}))),
|
...(await this.resolveAvatarAndBanner(exist, person.icon, person.image, person.backgroundUrl).catch(() => ({}))),
|
||||||
} as Partial<MiRemoteUser> & Pick<MiRemoteUser, 'isBot' | 'isCat' | 'speakAsCat' | 'isLocked' | 'movedToUri' | 'alsoKnownAs' | 'isExplorable'>;
|
} as Partial<MiRemoteUser> & Pick<MiRemoteUser, 'isBot' | 'isCat' | 'speakAsCat' | 'isLocked' | 'movedToUri' | 'alsoKnownAs' | 'isExplorable'>;
|
||||||
|
|
|
@ -215,6 +215,7 @@ export interface IActor extends IObject {
|
||||||
};
|
};
|
||||||
'vcard:bday'?: string;
|
'vcard:bday'?: string;
|
||||||
'vcard:Address'?: string;
|
'vcard:Address'?: string;
|
||||||
|
hideOnlineStatus?: boolean;
|
||||||
noindex?: boolean;
|
noindex?: boolean;
|
||||||
listenbrainz?: string;
|
listenbrainz?: string;
|
||||||
backgroundUrl?: string;
|
backgroundUrl?: string;
|
||||||
|
|
Loading…
Reference in a new issue