🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

nodebb-plugin-cards

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodebb-plugin-cards - npm Package Compare versions

Comparing version

to
0.3.0

4

package.json
{
"name": "nodebb-plugin-cards",
"version": "0.2.3",
"version": "0.3.0",
"description": "NodeBB plugin that extends the mentions plugin with hover cards",

@@ -26,4 +26,4 @@ "main": "library.js",

"nbbpm": {
"compatibility": "^0.9.0 || ^1.0.0"
"compatibility": "^1.19.0"
}
}

@@ -69,12 +69,12 @@ "use strict";

function toggleFollow($card, type, uid, username) {
socket.emit('user.' + type, {
uid: uid
}, function(err) {
if (err) {
return app.alertError(err.message);
}
require(['api', 'alerts'], function (api, alerts) {
api[type === 'follow' ? 'put' : 'del']('/users/' + uid + '/follow', undefined, function (err) {
if (err) {
return alerts.error(err);
}
$('[component="account/follow"]').toggleClass('hide', type === 'follow');
$('[component="account/unfollow"]').toggleClass('hide', type === 'unfollow');
app.alertSuccess('[[global:alert.' + type + ', ' + username + ']]');
$('[component="account/follow"]').toggleClass('hide', type === 'follow');
$('[component="account/unfollow"]').toggleClass('hide', type === 'unfollow');
alerts.success('[[global:alert.' + type + ', ' + username + ']]');
});
});

@@ -81,0 +81,0 @@ return false;