This commit is contained in:
parent
aaa7a07849
commit
0610acbf6e
10 changed files with 134 additions and 41 deletions
|
|
@ -25,6 +25,10 @@ class MisskeyEvent {
|
|||
this.publish(`user-stream:${userId}`, type, typeof value === 'undefined' ? null : value);
|
||||
}
|
||||
|
||||
public publishPostStream(postId: ID, type: string, value?: any): void {
|
||||
this.publish(`post-stream:${postId}`, type, typeof value === 'undefined' ? null : value);
|
||||
}
|
||||
|
||||
public publishMessagingStream(userId: ID, otherpartyId: ID, type: string, value?: any): void {
|
||||
this.publish(`messaging-stream:${userId}-${otherpartyId}`, type, typeof value === 'undefined' ? null : value);
|
||||
}
|
||||
|
|
@ -34,4 +38,6 @@ const ev = new MisskeyEvent();
|
|||
|
||||
export default ev.publishUserStream.bind(ev);
|
||||
|
||||
export const publishPostStream = ev.publishPostStream.bind(ev);
|
||||
|
||||
export const publishMessagingStream = ev.publishMessagingStream.bind(ev);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue