fix: frontend follow logic, as uid is no longer webfinger slug

This commit is contained in:
Julian Lam
2024-01-05 10:18:44 -05:00
parent 283e460a57
commit fcca9259b4

View File

@@ -108,7 +108,8 @@ define('forum/account/header', [
} }
function toggleFollow(type) { 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) { if (err) {
return alerts.error(err); return alerts.error(err);
} }