upd: get alt and blurhash on media

This commit is contained in:
Mar0xy 2023-09-25 05:22:45 +02:00
parent 62b2c31655
commit c10f785614
No known key found for this signature in database
GPG Key ID: 56569BBE47D2C828
3 changed files with 5 additions and 3 deletions

View File

@ -2178,7 +2178,7 @@ export default class Misskey implements MegalodonInterface {
public async getInstanceCustomEmojis(): Promise<Response<Array<Entity.Emoji>>> {
return this.client
.get<{ emojis: Array<MisskeyAPI.Entity.Emoji> }>('/api/emojis')
.then(res => ({ ...res, data: res.data.emojis && res.data.emojis.length > 0 ? res.data.emojis.map(e => MisskeyAPI.Converter.emoji(e)) : [] }))
.then(res => ({ ...res, data: res.data.emojis.map(e => MisskeyAPI.Converter.emoji(e)) }))
}
// ======================================

View File

@ -204,8 +204,8 @@ namespace MisskeyAPI {
width: f.properties.width,
height: f.properties.height
},
description: null,
blurhash: null
description: f.comment ? f.comment : null,
blurhash: f.blurhash ? f.blurhash : null
}
}

View File

@ -13,6 +13,8 @@ namespace MisskeyEntity {
avgColor: string
}
url: string
comment?: string
blurhash?: string
thumbnailUrl: string
}
}