mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2025-09-18 21:38:07 +00:00
prevent mastodon api error when not fetching reply or renote (resolves #1125)
Use of inner joins for `reply.user` and `renote.user` meant fetching a base note would always fail when asked to query reply or renote information.
This commit is contained in:
parent
05a499ac55
commit
b58bd4b9c9
1 changed files with 2 additions and 2 deletions
|
@ -59,7 +59,7 @@ export class MastodonDataService {
|
|||
if (typeof(relations.reply) === 'object') {
|
||||
if (relations.reply.reply) query.leftJoinAndSelect('reply.reply', 'replyReply');
|
||||
if (relations.reply.renote) query.leftJoinAndSelect('reply.renote', 'replyRenote');
|
||||
if (relations.reply.user) query.innerJoinAndSelect('reply.user', 'replyUser');
|
||||
if (relations.reply.user) query.leftJoinAndSelect('reply.user', 'replyUser');
|
||||
if (relations.reply.channel) query.leftJoinAndSelect('reply.channel', 'replyChannel');
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ export class MastodonDataService {
|
|||
if (typeof(relations.renote) === 'object') {
|
||||
if (relations.renote.reply) query.leftJoinAndSelect('renote.reply', 'renoteReply');
|
||||
if (relations.renote.renote) query.leftJoinAndSelect('renote.renote', 'renoteRenote');
|
||||
if (relations.renote.user) query.innerJoinAndSelect('renote.user', 'renoteUser');
|
||||
if (relations.renote.user) query.leftJoinAndSelect('renote.user', 'renoteUser');
|
||||
if (relations.renote.channel) query.leftJoinAndSelect('renote.channel', 'renoteChannel');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue