mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-20 16:25:36 +02:00
Merge commit from fork
Co-authored-by: Julia Johannesen <197614925+juliajohannesen@users.noreply.github.com>
This commit is contained in:
@@ -129,6 +129,9 @@ export interface NoteEventTypes {
|
||||
type NoteStreamEventTypes = {
|
||||
[key in keyof NoteEventTypes]: {
|
||||
id: MiNote['id'];
|
||||
userId: MiNote['userId'];
|
||||
visibility: MiNote['visibility'];
|
||||
visibleUserIds: MiNote['visibleUserIds'];
|
||||
body: NoteEventTypes[key];
|
||||
};
|
||||
};
|
||||
@@ -378,9 +381,12 @@ export class GlobalEventService {
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public publishNoteStream<K extends keyof NoteEventTypes>(noteId: MiNote['id'], type: K, value?: NoteEventTypes[K]): void {
|
||||
this.publish(`noteStream:${noteId}`, type, {
|
||||
id: noteId,
|
||||
public publishNoteStream<K extends keyof NoteEventTypes>(note: MiNote, type: K, value?: NoteEventTypes[K]): void {
|
||||
this.publish(`noteStream:${note.id}`, type, {
|
||||
id: note.id,
|
||||
userId: note.userId,
|
||||
visibility: note.visibility,
|
||||
visibleUserIds: note.visibleUserIds,
|
||||
body: value,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user