Merge branch 'develop' into feature/misskey-2024.07

fixing conflicts in `package.json`
This commit is contained in:
dakkar 2024-08-06 10:35:14 +01:00
commit 34c1e9ea2b
12 changed files with 49 additions and 21 deletions

View file

@ -203,7 +203,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const instances = await query.limit(ps.limit).offset(ps.offset).getMany();
return await this.instanceEntityService.packMany(instances);
return await this.instanceEntityService.packMany(instances, me);
});
}
}

View file

@ -107,9 +107,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const gotPubCount = topPubInstances.map(x => x.followingCount).reduce((a, b) => a + b, 0);
return await awaitAll({
topSubInstances: this.instanceEntityService.packMany(topSubInstances),
topSubInstances: this.instanceEntityService.packMany(topSubInstances, me),
otherFollowersCount: Math.max(0, allSubCount - gotSubCount),
topPubInstances: this.instanceEntityService.packMany(topPubInstances),
topPubInstances: this.instanceEntityService.packMany(topPubInstances, me),
otherFollowingCount: Math.max(0, allPubCount - gotPubCount),
});
});

View file

@ -205,6 +205,18 @@ export default class Connection {
@bindThis
private async onNoteStreamMessage(data: GlobalEvents['note']['payload']) {
// we must not send to the frontend information about notes from
// users who blocked the logged-in user, even when they're replies
// to notes the logged-in user can see
if (data.type === 'replied') {
const noteUserId = data.body.body.userId;
if (noteUserId !== null) {
if (this.userIdsWhoBlockingMe.has(noteUserId)) {
return;
}
}
}
this.sendMessageToWs('noteUpdated', {
id: data.body.id,
type: data.type,