Unfriend and update username - beta

This commit is contained in:
yflory
2017-07-13 17:32:57 +02:00
parent c3ba7cd792
commit 557f13f796
5 changed files with 167 additions and 32 deletions

View File

@@ -211,6 +211,7 @@ define([
$('<span>', {'class': 'name'}).text(name).appendTo($rightCol);
var proxy = Cryptpad.getProxy();
if (Cryptpad.isLoggedIn() && data.edPublic && data.edPublic !== proxy.edPublic) {
console.log(data.edPublic);
if (!proxy.friends || !proxy.friends[data.edPublic]) {
var $button = $('<button>', {'class': 'friend'}).appendTo($rightCol);
$button.text('Add friend').click(function (e) {