Creating only one WS connection to pusher from admin
Also: migration to Typescript 4.5 and µWebsockets 1.20.4
This commit is contained in:
parent
4875a8fed9
commit
4cff230256
8 changed files with 206 additions and 87 deletions
|
@ -44,7 +44,7 @@ export class AdminController extends BaseController {
|
|||
const roomId: string = body.roomId;
|
||||
|
||||
await apiClientRepository.getClient(roomId).then((roomClient) => {
|
||||
return new Promise((res, rej) => {
|
||||
return new Promise<void>((res, rej) => {
|
||||
const roomMessage = new RefreshRoomPromptMessage();
|
||||
roomMessage.setRoomid(roomId);
|
||||
|
||||
|
@ -101,7 +101,7 @@ export class AdminController extends BaseController {
|
|||
await Promise.all(
|
||||
targets.map((roomId) => {
|
||||
return apiClientRepository.getClient(roomId).then((roomClient) => {
|
||||
return new Promise((res, rej) => {
|
||||
return new Promise<void>((res, rej) => {
|
||||
if (type === "message") {
|
||||
const roomMessage = new AdminRoomMessage();
|
||||
roomMessage.setMessage(text);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue