Cherrypick listenbrainz #52

Open
leah wants to merge 13 commits from cherrypick/listenbrainz into main
4 changed files with 10 additions and 0 deletions
Showing only changes of commit 5de77871ec - Show all commits

View file

@ -537,6 +537,10 @@ export class ApRendererService {
person['vcard:Address'] = profile.location; person['vcard:Address'] = profile.location;
} }
if (profile.listenbrainz) {
person.listenbrainz = profile.listenbrainz;
}
return person; return person;
} }

View file

@ -553,6 +553,9 @@ export const CONTEXTS: (string | Context)[] = [
'_misskey_votes': 'misskey:_misskey_votes', '_misskey_votes': 'misskey:_misskey_votes',
'_misskey_summary': 'misskey:_misskey_summary', '_misskey_summary': 'misskey:_misskey_summary',
'isCat': 'misskey:isCat', 'isCat': 'misskey:isCat',
sharkey: 'https://joinsharkey.org/ns#',
listenbrainz: 'sharkey:listenbrainz',
// vcard // vcard
vcard: 'http://www.w3.org/2006/vcard/ns#', vcard: 'http://www.w3.org/2006/vcard/ns#',
} satisfies Context, } satisfies Context,

View file

@ -410,6 +410,7 @@ export class ApPersonService implements OnModuleInit {
birthday: bday?.[0] ?? null, birthday: bday?.[0] ?? null,
location: person['vcard:Address'] ?? null, location: person['vcard:Address'] ?? null,
userHost: host, userHost: host,
listenbrainz: person.listenbrainz ?? null,
})); }));
if (person.publicKey) { if (person.publicKey) {
@ -615,6 +616,7 @@ export class ApPersonService implements OnModuleInit {
followersVisibility, followersVisibility,
birthday: bday?.[0] ?? null, birthday: bday?.[0] ?? null,
location: person['vcard:Address'] ?? null, location: person['vcard:Address'] ?? null,
listenbrainz: person.listenbrainz ?? null,
}); });
this.globalEventService.publishInternalEvent('remoteUserUpdated', { id: exist.id }); this.globalEventService.publishInternalEvent('remoteUserUpdated', { id: exist.id });

View file

@ -191,6 +191,7 @@ export interface IActor extends IObject {
}; };
'vcard:bday'?: string; 'vcard:bday'?: string;
'vcard:Address'?: string; 'vcard:Address'?: string;
listenbrainz?: string;
} }
export const isCollection = (object: IObject): object is ICollection => export const isCollection = (object: IObject): object is ICollection =>