Skip to content

Commit a27af00

Browse files
committed
Renote・Replyも対象に
1 parent 33cb507 commit a27af00

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/backend/src/core/NoteCreateService.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,13 @@ export class NoteCreateService implements OnApplicationShutdown {
359359
mentionedUsers = data.apMentions ?? await this.extractMentionedUsers(user, combinedTokens);
360360
}
361361

362+
const willCauseNotification = mentionedUsers.length > 0 || data.reply?.userHost === null || data.renote?.userHost === null;
363+
362364
// #region Shrimpia
363-
if (user.host != null && mentionedUsers.length > 0) {
365+
if (user.host != null && willCauseNotification) {
364366
const userEntity = await this.usersRepository.findOneBy({ id: user.id });
365367
if ((userEntity?.followersCount ?? 0) === 0) {
366-
throw new Error('Temporarily, notes including mentions from remote users which no followers are not allowed');
368+
throw new Error('Temporarily, notes including mentions, replies and renotes to local-user from remote users which is not followed by local-users are not allowed');
367369
}
368370
}
369371
// #endregion

0 commit comments

Comments
 (0)