mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-12 21:58:11 +09:00
parent
a1d6204982
commit
8934d3a0fc
@ -26,7 +26,7 @@ module.exports = (server: http.Server) => {
|
|||||||
const subscriber = redis.createClient(
|
const subscriber = redis.createClient(
|
||||||
config.redis.port, config.redis.host);
|
config.redis.port, config.redis.host);
|
||||||
|
|
||||||
subscriber.subscribe('misskey');
|
subscriber.subscribe(config.host);
|
||||||
|
|
||||||
ev = new EventEmitter();
|
ev = new EventEmitter();
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import { Note } from '../models/entities/note';
|
|||||||
import { UserList } from '../models/entities/user-list';
|
import { UserList } from '../models/entities/user-list';
|
||||||
import { ReversiGame } from '../models/entities/games/reversi/game';
|
import { ReversiGame } from '../models/entities/games/reversi/game';
|
||||||
import { UserGroup } from '../models/entities/user-group';
|
import { UserGroup } from '../models/entities/user-group';
|
||||||
|
import config from '../config';
|
||||||
|
|
||||||
class Publisher {
|
class Publisher {
|
||||||
private publish = (channel: string, type: string | null, value?: any): void => {
|
private publish = (channel: string, type: string | null, value?: any): void => {
|
||||||
@ -11,7 +12,7 @@ class Publisher {
|
|||||||
{ type: type, body: null } :
|
{ type: type, body: null } :
|
||||||
{ type: type, body: value };
|
{ type: type, body: value };
|
||||||
|
|
||||||
redis.publish('misskey', JSON.stringify({
|
redis.publish(config.host, JSON.stringify({
|
||||||
channel: channel,
|
channel: channel,
|
||||||
message: message
|
message: message
|
||||||
}));
|
}));
|
||||||
|
Loading…
Reference in New Issue
Block a user