Manual takeback command for ops
This commit is contained in:
parent
9f64c6907b
commit
0e46d6e679
19
src/App.vue
19
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) {
|
||||
|
|
|
@ -299,7 +299,8 @@ export default {
|
|||
<!-- Owner or admin: take back the message -->
|
||||
<button type="button" v-if="message.username === username || isOp"
|
||||
class="button is-small px-2 ml-1"
|
||||
title="Take back this message (delete it for everybody)" @click="takeback()">
|
||||
title="Take back this message (delete it for everybody)" @click="takeback()"
|
||||
:data-msgid="message.msgID">
|
||||
<i class="fa fa-rotate-left has-text-danger"></i>
|
||||
</button>
|
||||
|
||||
|
@ -483,7 +484,7 @@ export default {
|
|||
</a>
|
||||
|
||||
<a href="#" class="dropdown-item" v-if="message.username === username || isOp"
|
||||
@click.prevent="takeback()">
|
||||
@click.prevent="takeback()" :data-msgid="message.msgID">
|
||||
<i class="fa fa-rotate-left has-text-danger mr-1"></i>
|
||||
Take back
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue
Block a user