Manual takeback command for ops
This commit is contained in:
parent
9f64c6907b
commit
0e46d6e679
13
src/App.vue
13
src/App.vue
|
@ -1116,6 +1116,19 @@ export default {
|
||||||
return;
|
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
|
// DEBUGGING: fake open a broken video to see the error graphic
|
||||||
if (this.message.toLowerCase().indexOf("/debug-broken-video") === 0) {
|
if (this.message.toLowerCase().indexOf("/debug-broken-video") === 0) {
|
||||||
this.WebRTC.streams["#broken"] = null;
|
this.WebRTC.streams["#broken"] = null;
|
||||||
|
|
|
@ -299,7 +299,8 @@ export default {
|
||||||
<!-- Owner or admin: take back the message -->
|
<!-- Owner or admin: take back the message -->
|
||||||
<button type="button" v-if="message.username === username || isOp"
|
<button type="button" v-if="message.username === username || isOp"
|
||||||
class="button is-small px-2 ml-1"
|
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>
|
<i class="fa fa-rotate-left has-text-danger"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
@ -483,7 +484,7 @@ export default {
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="#" class="dropdown-item" v-if="message.username === username || isOp"
|
<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>
|
<i class="fa fa-rotate-left has-text-danger mr-1"></i>
|
||||||
Take back
|
Take back
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user