mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-25 15:35:12 +00:00
fix: adding description not working on media
This commit is contained in:
parent
b070e85566
commit
324cc5509e
3 changed files with 8 additions and 4 deletions
|
@ -143,7 +143,7 @@ export class MastodonApiServerService {
|
||||||
const data = await client.uploadMedia(multipartData);
|
const data = await client.uploadMedia(multipartData);
|
||||||
reply.send(convertAttachment(data.data as Entity.Attachment));
|
reply.send(convertAttachment(data.data as Entity.Attachment));
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
console.error(e);
|
/* console.error(e); */
|
||||||
reply.code(401).send(e.response.data);
|
reply.code(401).send(e.response.data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -158,11 +158,10 @@ export class MastodonApiServerService {
|
||||||
reply.code(401).send({ error: 'No image' });
|
reply.code(401).send({ error: 'No image' });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.error(_request.body);
|
|
||||||
const data = await client.uploadMedia(multipartData, _request.body!);
|
const data = await client.uploadMedia(multipartData, _request.body!);
|
||||||
reply.send(convertAttachment(data.data as Entity.Attachment));
|
reply.send(convertAttachment(data.data as Entity.Attachment));
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
console.error(e);
|
/* console.error(e); */
|
||||||
reply.code(401).send(e.response.data);
|
reply.code(401).send(e.response.data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -377,7 +377,7 @@ export class ApiStatusMastodon {
|
||||||
const data = await client.updateMedia(convertId(_request.params.id, IdType.SharkeyId), _request.body as any);
|
const data = await client.updateMedia(convertId(_request.params.id, IdType.SharkeyId), _request.body as any);
|
||||||
reply.send(convertAttachment(data.data));
|
reply.send(convertAttachment(data.data));
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
console.error(e);
|
/* console.error(e); */
|
||||||
reply.code(401).send(e.response.data);
|
reply.code(401).send(e.response.data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1446,6 +1446,11 @@ export default class Misskey implements MegalodonInterface {
|
||||||
isSensitive: options.is_sensitive
|
isSensitive: options.is_sensitive
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if (options.description !== undefined) {
|
||||||
|
params = Object.assign(params, {
|
||||||
|
comment: options.description,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return this.client
|
return this.client
|
||||||
.post<MisskeyAPI.Entity.File>('/api/drive/files/update', params)
|
.post<MisskeyAPI.Entity.File>('/api/drive/files/update', params)
|
||||||
|
|
Loading…
Reference in a new issue