summaryrefslogtreecommitdiff
path: root/src/services/note
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2021-09-22 22:35:55 +0900
committerGitHub <noreply@github.com>2021-09-22 22:35:55 +0900
commit14795b68f2234c90504cd0a979de42ff4d757441 (patch)
treeaef21d0af6db7f373fe095806fbccce414375fc3 /src/services/note
parentNew Crowdin updates (#7764) (diff)
downloadsharkey-14795b68f2234c90504cd0a979de42ff4d757441.tar.gz
sharkey-14795b68f2234c90504cd0a979de42ff4d757441.tar.bz2
sharkey-14795b68f2234c90504cd0a979de42ff4d757441.zip
refactor: PackedHoge型をPacked<'Hoge'>型に書き換える (#7792)
* packedNotificationSchemaを更新 * read:gallery, write:gallery, read:gallery-likes, write:gallery-likesに翻訳を追加 * fix * add header, choice, invitation * test * fix * yatta * remove no longer needed "as PackedUser/PackedNote" * clean up * add simple-schema * fix lint * define items in full Schema * revert https://github.com/misskey-dev/misskey/pull/7772#discussion_r706627736 * user packとnote packの型不整合を修正 * add prelude/types.ts * emoji * signin * game * matching * fix * add emoji schema * add reversiGame * add reversiMatching * remove signin schema (use Signin entity) * add Packed type * note-reaction * user * user-group * user-list * note * app, messaging-message * notification * drive-file * drive-folder * following * muting * blocking * hashtag * page * app (with modifying schema) * import user? * channel * antenna * clip * gallery-post * emoji * Packed * reversi-matching * add changelog * add changelog * revert fix
Diffstat (limited to 'src/services/note')
-rw-r--r--src/services/note/read.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/services/note/read.ts b/src/services/note/read.ts
index b5e7de7976..f25f86da9c 100644
--- a/src/services/note/read.ts
+++ b/src/services/note/read.ts
@@ -6,15 +6,15 @@ import { Not, IsNull, In } from 'typeorm';
import { Channel } from '@/models/entities/channel';
import { checkHitAntenna } from '@/misc/check-hit-antenna';
import { getAntennas } from '@/misc/antenna-cache';
-import { PackedNote } from '@/models/repositories/note';
import { readNotificationByQuery } from '@/server/api/common/read-notification';
+import { Packed } from '@/misc/schema';
/**
* Mark notes as read
*/
export default async function(
userId: User['id'],
- notes: (Note | PackedNote)[],
+ notes: (Note | Packed<'Note'>)[],
info?: {
following: Set<User['id']>;
followingChannels: Set<Channel['id']>;
@@ -34,10 +34,10 @@ export default async function(
})).map(x => x.followeeId));
const myAntennas = (await getAntennas()).filter(a => a.userId === userId);
- const readMentions: (Note | PackedNote)[] = [];
- const readSpecifiedNotes: (Note | PackedNote)[] = [];
- const readChannelNotes: (Note | PackedNote)[] = [];
- const readAntennaNotes: (Note | PackedNote)[] = [];
+ const readMentions: (Note | Packed<'Note'>)[] = [];
+ const readSpecifiedNotes: (Note | Packed<'Note'>)[] = [];
+ const readChannelNotes: (Note | Packed<'Note'>)[] = [];
+ const readAntennaNotes: (Note | Packed<'Note'>)[] = [];
for (const note of notes) {
if (note.mentions && note.mentions.includes(userId)) {