]> git.mxchange.org Git - friendica.git/commitdiff
ACL automentions are now in the new format
authorMichael <heluecht@pirati.ca>
Sun, 27 Aug 2017 20:39:15 +0000 (20:39 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 27 Aug 2017 20:39:15 +0000 (20:39 +0000)
js/acl.js

index ac0bb3c7ef6e19696609442bf4846f0eb0e1feb5..1ed354bbfaa75e0d4cb08e4c5ff18e3a0dbaf449 100644 (file)
--- a/js/acl.js
+++ b/js/acl.js
@@ -47,7 +47,14 @@ ACL.prototype.remove_mention = function(id) {
                return;
        }
        var nick = this.data[id].nick;
-       var searchText = "@" + nick + "+" + id + " ";
+       var addr = this.data[id].addr;
+
+       if (addr != "") {
+               var searchText = "@" + addr + " ";
+       } else {
+               var searchText = "@" + nick + "+" + id + " ";
+       }
+
        var start = this.element.val().indexOf(searchText);
        if (start < 0) {
                return;
@@ -61,7 +68,14 @@ ACL.prototype.add_mention = function(id) {
                return;
        }
        var nick = this.data[id].nick;
-       var searchText =  "@" + nick + "+" + id + " ";
+       var addr = this.data[id].addr;
+
+       if (addr != "") {
+               var searchText = "@" + addr + " ";
+       } else {
+               var searchText = "@" + nick + "+" + id + " ";
+       }
+
        if (this.element.val().indexOf( searchText) >= 0 ) {
                return;
        }