ACL automentions are now in the new format
This commit is contained in:
parent
ccb54f3ee4
commit
1190863e1e
1 changed files with 16 additions and 2 deletions
14
js/acl.js
14
js/acl.js
|
@ -47,7 +47,14 @@ ACL.prototype.remove_mention = function(id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var nick = this.data[id].nick;
|
var nick = this.data[id].nick;
|
||||||
|
var addr = this.data[id].addr;
|
||||||
|
|
||||||
|
if (addr != "") {
|
||||||
|
var searchText = "@" + addr + " ";
|
||||||
|
} else {
|
||||||
var searchText = "@" + nick + "+" + id + " ";
|
var searchText = "@" + nick + "+" + id + " ";
|
||||||
|
}
|
||||||
|
|
||||||
var start = this.element.val().indexOf(searchText);
|
var start = this.element.val().indexOf(searchText);
|
||||||
if (start < 0) {
|
if (start < 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -61,7 +68,14 @@ ACL.prototype.add_mention = function(id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var nick = this.data[id].nick;
|
var nick = this.data[id].nick;
|
||||||
|
var addr = this.data[id].addr;
|
||||||
|
|
||||||
|
if (addr != "") {
|
||||||
|
var searchText = "@" + addr + " ";
|
||||||
|
} else {
|
||||||
var searchText = "@" + nick + "+" + id + " ";
|
var searchText = "@" + nick + "+" + id + " ";
|
||||||
|
}
|
||||||
|
|
||||||
if (this.element.val().indexOf( searchText) >= 0 ) {
|
if (this.element.val().indexOf( searchText) >= 0 ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue