fix megalodon getRelationship function

This commit is contained in:
Hazelnoot 2025-03-21 22:52:00 -04:00
parent de26ffd60b
commit 759e7f05c4

View file

@ -591,12 +591,12 @@ export default class Misskey implements MegalodonInterface {
*/ */
public async getRelationship(id: string): Promise<Response<Entity.Relationship>> { public async getRelationship(id: string): Promise<Response<Entity.Relationship>> {
return this.client return this.client
.post<MisskeyAPI.Entity.Relation>('/api/users/relation', { .post<MisskeyAPI.Entity.Relation[]>('/api/users/relation', {
userId: id userId: id
}) })
.then(res => { .then(res => {
return Object.assign(res, { return Object.assign(res, {
data: MisskeyAPI.Converter.relation(res.data) data: MisskeyAPI.Converter.relation(res.data[0])
}) })
}) })
} }