summaryrefslogtreecommitdiff
path: root/src/api/event.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/event.ts')
-rw-r--r--src/api/event.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/api/event.ts b/src/api/event.ts
index 4a2e4e453d..4c9cc18e4d 100644
--- a/src/api/event.ts
+++ b/src/api/event.ts
@@ -38,6 +38,14 @@ class MisskeyEvent {
this.publish(`messaging-index-stream:${userId}`, type, typeof value === 'undefined' ? null : value);
}
+ public publishOthelloStream(userId: ID, type: string, value?: any): void {
+ this.publish(`othello-stream:${userId}`, type, typeof value === 'undefined' ? null : value);
+ }
+
+ public publishOthelloGameStream(gameId: ID, type: string, value?: any): void {
+ this.publish(`othello-game-stream:${gameId}`, type, typeof value === 'undefined' ? null : value);
+ }
+
public publishChannelStream(channelId: ID, type: string, value?: any): void {
this.publish(`channel-stream:${channelId}`, type, typeof value === 'undefined' ? null : value);
}
@@ -65,4 +73,8 @@ export const publishMessagingStream = ev.publishMessagingStream.bind(ev);
export const publishMessagingIndexStream = ev.publishMessagingIndexStream.bind(ev);
+export const publishOthelloStream = ev.publishOthelloStream.bind(ev);
+
+export const publishOthelloGameStream = ev.publishOthelloGameStream.bind(ev);
+
export const publishChannelStream = ev.publishChannelStream.bind(ev);