summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/NoteCreateService.ts
diff options
context:
space:
mode:
authormisskey-release-bot[bot] <157398866+misskey-release-bot[bot]@users.noreply.github.com>2025-04-09 02:17:31 +0000
committerGitHub <noreply@github.com>2025-04-09 02:17:31 +0000
commit3c3982464fb827720e3bc456ab3605e0a139da25 (patch)
treecb5045fcfa8cb7950bdbd0e8a645333299354e11 /packages/backend/src/core/NoteCreateService.ts
parentMerge pull request #15615 from misskey-dev/develop (diff)
parentRelease: 2025.4.0 (diff)
downloadmisskey-3c3982464fb827720e3bc456ab3605e0a139da25.tar.gz
misskey-3c3982464fb827720e3bc456ab3605e0a139da25.tar.bz2
misskey-3c3982464fb827720e3bc456ab3605e0a139da25.zip
Merge pull request #15735 from misskey-dev/develop
Release: 2025.4.0
Diffstat (limited to 'packages/backend/src/core/NoteCreateService.ts')
-rw-r--r--packages/backend/src/core/NoteCreateService.ts32
1 files changed, 4 insertions, 28 deletions
diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts
index 8a79908e82..1ddb2b173d 100644
--- a/packages/backend/src/core/NoteCreateService.ts
+++ b/packages/backend/src/core/NoteCreateService.ts
@@ -42,7 +42,6 @@ import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { ApDeliverManagerService } from '@/core/activitypub/ApDeliverManagerService.js';
-import { NoteReadService } from '@/core/NoteReadService.js';
import { RemoteUserResolveService } from '@/core/RemoteUserResolveService.js';
import { bindThis } from '@/decorators.js';
import { DB_MAX_NOTE_TEXT_LENGTH } from '@/const.js';
@@ -199,7 +198,6 @@ export class NoteCreateService implements OnApplicationShutdown {
private globalEventService: GlobalEventService,
private queueService: QueueService,
private fanoutTimelineService: FanoutTimelineService,
- private noteReadService: NoteReadService,
private notificationService: NotificationService,
private relayService: RelayService,
private federatedInstanceService: FederatedInstanceService,
@@ -534,7 +532,10 @@ export class NoteCreateService implements OnApplicationShutdown {
this.pushToTl(note, user);
- this.antennaService.addNoteToAntennas(note, user);
+ this.antennaService.addNoteToAntennas({
+ ...note,
+ channel: data.channel ?? null,
+ }, user);
if (data.reply) {
this.saveReply(data.reply, note);
@@ -582,31 +583,6 @@ export class NoteCreateService implements OnApplicationShutdown {
if (!silent) {
if (this.userEntityService.isLocalUser(user)) this.activeUsersChart.write(user);
- // 未読通知を作成
- if (data.visibility === 'specified') {
- if (data.visibleUsers == null) throw new Error('invalid param');
-
- for (const u of data.visibleUsers) {
- // ローカルユーザーのみ
- if (!this.userEntityService.isLocalUser(u)) continue;
-
- this.noteReadService.insertNoteUnread(u.id, note, {
- isSpecified: true,
- isMentioned: false,
- });
- }
- } else {
- for (const u of mentionedUsers) {
- // ローカルユーザーのみ
- if (!this.userEntityService.isLocalUser(u)) continue;
-
- this.noteReadService.insertNoteUnread(u.id, note, {
- isSpecified: false,
- isMentioned: true,
- });
- }
- }
-
// Pack the note
const noteObj = await this.noteEntityService.pack(note, null, { skipHide: true, withReactionAndUserPairCache: true });