diff --git a/src/App.vue b/src/App.vue index 8c9f050..7ff5dc0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1116,6 +1116,19 @@ export default { return; } + // DEBUGGING: manual takeback admin command. + match = this.message.match(/^\/takeback (\d+)$/i); + if (match) { + let msgID = parseInt(match[1]); + this.client.send({ + action: "takeback", + msgID: msgID, + }); + this.ChatClient(`Takeback command send for message ID ${msgID}.`); + this.message = ""; + return; + } + // DEBUGGING: fake open a broken video to see the error graphic if (this.message.toLowerCase().indexOf("/debug-broken-video") === 0) { this.WebRTC.streams["#broken"] = null; @@ -2134,9 +2147,9 @@ export default { message: "Do you want to take this message back? Doing so will remove this message from everybody's view in the chat room." }).then(() => { this.client.send({ - action: "takeback", - msgID: msg.msgID, - }); + action: "takeback", + msgID: msg.msgID, + }); }); }, removeMessage(msg) { diff --git a/src/components/MessageBox.vue b/src/components/MessageBox.vue index f1ae42b..746f06d 100644 --- a/src/components/MessageBox.vue +++ b/src/components/MessageBox.vue @@ -299,7 +299,8 @@ export default { @@ -483,7 +484,7 @@ export default { + @click.prevent="takeback()" :data-msgid="message.msgID"> Take back