mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 03:17:38 -07:00
[mastodon-client] Correctly return status.tags
This commit is contained in:
parent
d39a3f2f66
commit
73ac3048ef
2 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -13,7 +13,6 @@ export class NotificationConverter {
|
|||
public static async encode(notification: Notification, localUser: ILocalUser, cache: AccountCache = UserHelpers.getFreshAccountCache()): Promise<MastodonEntity.Notification> {
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue