mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: frontend follow logic, as uid is no longer webfinger slug
This commit is contained in:
@@ -108,7 +108,8 @@ define('forum/account/header', [
|
||||
}
|
||||
|
||||
function toggleFollow(type) {
|
||||
api[type === 'follow' ? 'put' : 'del']('/users/' + ajaxify.data.uid + '/follow', undefined, function (err) {
|
||||
const target = isFinite(ajaxify.data.uid) ? ajaxify.data.uid : encodeURIComponent(ajaxify.data.userslug);
|
||||
api[type === 'follow' ? 'put' : 'del']('/users/' + target + '/follow', undefined, function (err) {
|
||||
if (err) {
|
||||
return alerts.error(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user