|
@ -50,6 +50,10 @@ class SiteTerminalApp extends SiteRuntime { |
|
|
handler: this.removeMessage.bind(this), |
|
|
handler: this.removeMessage.bind(this), |
|
|
help: 'remove-message messageId', |
|
|
help: 'remove-message messageId', |
|
|
}, |
|
|
}, |
|
|
|
|
|
'remove-chat-room': { |
|
|
|
|
|
handler: this.removeChatRoom.bind(this), |
|
|
|
|
|
help: 'remove-chat-room roomId', |
|
|
|
|
|
}, |
|
|
'transcode-mov': { |
|
|
'transcode-mov': { |
|
|
handler: this.transcodeMov.bind(this), |
|
|
handler: this.transcodeMov.bind(this), |
|
|
help: 'transcode-mov filename', |
|
|
help: 'transcode-mov filename', |
|
@ -159,6 +163,16 @@ class SiteTerminalApp extends SiteRuntime { |
|
|
await chatService.removeMessage(message); |
|
|
await chatService.removeMessage(message); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async removeChatRoom (args) { |
|
|
|
|
|
const { chat: chatService } = this.services; |
|
|
|
|
|
const roomId = args.shift(); |
|
|
|
|
|
const room = await chatService.getRoomById(roomId); |
|
|
|
|
|
if (!room) { |
|
|
|
|
|
throw new Error('chat room not found'); |
|
|
|
|
|
} |
|
|
|
|
|
await chatService.destroyRoom(room); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
async transcodeMov (args) { |
|
|
async transcodeMov (args) { |
|
|
const { video: videoService } = this.services; |
|
|
const { video: videoService } = this.services; |
|
|
|
|
|
|
|
|