@@ -3,6 +3,7 @@ import { User } from '../models/entities/user';
|
||||
import { Note } from '../models/entities/note';
|
||||
import { UserList } from '../models/entities/user-list';
|
||||
import { ReversiGame } from '../models/entities/games/reversi/game';
|
||||
import { UserGroup } from '../models/entities/user-group';
|
||||
|
||||
class Publisher {
|
||||
private publish = (channel: string, type: string | null, value?: any): void => {
|
||||
@@ -39,6 +40,10 @@ class Publisher {
|
||||
this.publish(`messagingStream:${userId}-${otherpartyId}`, type, typeof value === 'undefined' ? null : value);
|
||||
}
|
||||
|
||||
public publishGroupMessagingStream = (groupId: UserGroup['id'], type: string, value?: any): void => {
|
||||
this.publish(`messagingStream:${groupId}`, type, typeof value === 'undefined' ? null : value);
|
||||
}
|
||||
|
||||
public publishMessagingIndexStream = (userId: User['id'], type: string, value?: any): void => {
|
||||
this.publish(`messagingIndexStream:${userId}`, type, typeof value === 'undefined' ? null : value);
|
||||
}
|
||||
@@ -74,6 +79,7 @@ export const publishNoteStream = publisher.publishNoteStream;
|
||||
export const publishNotesStream = publisher.publishNotesStream;
|
||||
export const publishUserListStream = publisher.publishUserListStream;
|
||||
export const publishMessagingStream = publisher.publishMessagingStream;
|
||||
export const publishGroupMessagingStream = publisher.publishGroupMessagingStream;
|
||||
export const publishMessagingIndexStream = publisher.publishMessagingIndexStream;
|
||||
export const publishReversiStream = publisher.publishReversiStream;
|
||||
export const publishReversiGameStream = publisher.publishReversiGameStream;
|
||||
|
||||
Reference in New Issue
Block a user