mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2025-04-13 09:44:40 +00:00
fix empty response from /api/v1/notifications
This commit is contained in:
parent
178fe16f68
commit
cac8377e4e
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ export class ApiNotificationsMastodon {
|
||||||
fastify.get<ApiNotifyMastodonRoute>('/v1/notifications', async (_request, reply) => {
|
fastify.get<ApiNotifyMastodonRoute>('/v1/notifications', async (_request, reply) => {
|
||||||
const { client, me } = await this.clientService.getAuthClient(_request);
|
const { client, me } = await this.clientService.getAuthClient(_request);
|
||||||
const data = await client.getNotifications(parseTimelineArgs(_request.query));
|
const data = await client.getNotifications(parseTimelineArgs(_request.query));
|
||||||
const response = Promise.all(data.data.map(async n => {
|
const response = await Promise.all(data.data.map(async n => {
|
||||||
const converted = await this.mastoConverters.convertNotification(n, me);
|
const converted = await this.mastoConverters.convertNotification(n, me);
|
||||||
if (converted.type === 'reaction') {
|
if (converted.type === 'reaction') {
|
||||||
converted.type = 'favourite';
|
converted.type = 'favourite';
|
||||||
|
|
Loading…
Add table
Reference in a new issue