Fix profile link in the userlist

pull/1/head
yflory 7 years ago
parent d6c33fdf4f
commit e81bb3fe08

@ -161,6 +161,7 @@ define([
var metadataMgr = config.metadataMgr; var metadataMgr = config.metadataMgr;
var userData = metadataMgr.getMetadata().users; var userData = metadataMgr.getMetadata().users;
var viewers = metadataMgr.getViewers(); var viewers = metadataMgr.getViewers();
var origin = config.metadataMgr.getPrivateData().origin;
// If we are using old pads (readonly unavailable), only editing users are in userList. // If we are using old pads (readonly unavailable), only editing users are in userList.
// With new pads, we also have readonly users in userList, so we have to intersect with // With new pads, we also have readonly users in userList, so we have to intersect with
@ -225,7 +226,7 @@ define([
if (data.profile) { if (data.profile) {
$span.addClass('clickable'); $span.addClass('clickable');
$span.click(function () { $span.click(function () {
window.open('/profile/#' + data.profile); window.open(origin+'/profile/#' + data.profile);
}); });
} }
if (data.avatar && avatars[data.avatar]) { if (data.avatar && avatars[data.avatar]) {

Loading…
Cancel
Save