diff --git a/packages/backend/src/server/api/mastodon/converters/note.ts b/packages/backend/src/server/api/mastodon/converters/note.ts index a05437474..ef8af2dbc 100644 --- a/packages/backend/src/server/api/mastodon/converters/note.ts +++ b/packages/backend/src/server/api/mastodon/converters/note.ts @@ -90,6 +90,13 @@ export class NoteConverter { ? UserNotePinings.exist({where: {userId: user.id, noteId: note.id}}) : undefined; + const tags = note.tags.map(tag => { + return { + name: tag, + url: `${config.url}/tags/${tag}` + } as MastodonEntity.Tag; + }); + // noinspection ES6MissingAwait return await awaitAll({ id: note.id, @@ -118,7 +125,7 @@ export class NoteConverter { visibility: VisibilityConverter.encode(note.visibility), media_attachments: files.then(files => files.length > 0 ? files.map((f) => FileConverter.encode(f)) : []), mentions: mentions, - tags: [], //FIXME + tags: tags, card: null, //FIXME poll: note.hasPoll ? populatePoll(note, user?.id ?? null).then(p => PollConverter.encode(p, note.id)) : null, application: null, //FIXME diff --git a/packages/backend/src/server/api/mastodon/converters/notification.ts b/packages/backend/src/server/api/mastodon/converters/notification.ts index f12aad3e1..0dc417581 100644 --- a/packages/backend/src/server/api/mastodon/converters/notification.ts +++ b/packages/backend/src/server/api/mastodon/converters/notification.ts @@ -13,7 +13,6 @@ export class NotificationConverter { public static async encode(notification: Notification, localUser: ILocalUser, cache: AccountCache = UserHelpers.getFreshAccountCache()): Promise { if (notification.notifieeId !== localUser.id) throw new Error('User is not recipient of notification'); - //TODO: Test this (poll ended etc) const account = notification.notifierId ? UserHelpers.getUserCached(notification.notifierId, cache).then(p => UserConverter.encode(p)) : UserConverter.encode(localUser);