v12 (#5712)
Co-authored-by: MeiMei <30769358+mei23@users.noreply.github.com> Co-authored-by: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import { UserList } from '../models/entities/user-list';
|
||||
import { ReversiGame } from '../models/entities/games/reversi/game';
|
||||
import { UserGroup } from '../models/entities/user-group';
|
||||
import config from '../config';
|
||||
import { Antenna } from '../models/entities/antenna';
|
||||
|
||||
class Publisher {
|
||||
private publish = (channel: string, type: string | null, value?: any): void => {
|
||||
@@ -37,6 +38,10 @@ class Publisher {
|
||||
this.publish(`userListStream:${listId}`, type, typeof value === 'undefined' ? null : value);
|
||||
}
|
||||
|
||||
public publishAntennaStream = (antennaId: Antenna['id'], type: string, value?: any): void => {
|
||||
this.publish(`antennaStream:${antennaId}`, type, typeof value === 'undefined' ? null : value);
|
||||
}
|
||||
|
||||
public publishMessagingStream = (userId: User['id'], otherpartyId: User['id'], type: string, value?: any): void => {
|
||||
this.publish(`messagingStream:${userId}-${otherpartyId}`, type, typeof value === 'undefined' ? null : value);
|
||||
}
|
||||
@@ -61,10 +66,6 @@ class Publisher {
|
||||
this.publish('notesStream', null, note);
|
||||
}
|
||||
|
||||
public publishApLogStream = (log: any): void => {
|
||||
this.publish('apLog', null, log);
|
||||
}
|
||||
|
||||
public publishAdminStream = (userId: User['id'], type: string, value?: any): void => {
|
||||
this.publish(`adminStream:${userId}`, type, typeof value === 'undefined' ? null : value);
|
||||
}
|
||||
@@ -79,10 +80,10 @@ export const publishDriveStream = publisher.publishDriveStream;
|
||||
export const publishNoteStream = publisher.publishNoteStream;
|
||||
export const publishNotesStream = publisher.publishNotesStream;
|
||||
export const publishUserListStream = publisher.publishUserListStream;
|
||||
export const publishAntennaStream = publisher.publishAntennaStream;
|
||||
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;
|
||||
export const publishApLogStream = publisher.publishApLogStream;
|
||||
export const publishAdminStream = publisher.publishAdminStream;
|
||||
|
||||
Reference in New Issue
Block a user