diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2021-09-22 22:35:55 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-22 22:35:55 +0900 |
| commit | 14795b68f2234c90504cd0a979de42ff4d757441 (patch) | |
| tree | aef21d0af6db7f373fe095806fbccce414375fc3 /src/server/api/stream/index.ts | |
| parent | New Crowdin updates (#7764) (diff) | |
| download | sharkey-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/server/api/stream/index.ts')
| -rw-r--r-- | src/server/api/stream/index.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/api/stream/index.ts b/src/server/api/stream/index.ts index f83bc9331e..ccd555e149 100644 --- a/src/server/api/stream/index.ts +++ b/src/server/api/stream/index.ts @@ -14,7 +14,7 @@ import { AccessToken } from '@/models/entities/access-token'; import { UserProfile } from '@/models/entities/user-profile'; import { publishChannelStream, publishGroupMessagingStream, publishMessagingStream } from '@/services/stream'; import { UserGroup } from '@/models/entities/user-group'; -import { PackedNote } from '@/models/repositories/note'; +import { Packed } from '@/misc/schema'; /** * Main stream connection @@ -31,7 +31,7 @@ export default class Connection { public subscriber: EventEmitter; private channels: Channel[] = []; private subscribingNotes: any = {}; - private cachedNotes: PackedNote[] = []; + private cachedNotes: Packed<'Note'>[] = []; constructor( wsConnection: websocket.connection, @@ -150,8 +150,8 @@ export default class Connection { } @autobind - public cacheNote(note: PackedNote) { - const add = (note: PackedNote) => { + public cacheNote(note: Packed<'Note'>) { + const add = (note: Packed<'Note'>) => { const existIndex = this.cachedNotes.findIndex(n => n.id === note.id); if (existIndex > -1) { this.cachedNotes[existIndex] = note; |