mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 08:55:47 +01:00
updated hooks action:groups.join, action:groups.leave, and action:groups.requestMembership to match other action hooks in group namespace (that's "group", not "groups"), ping @EisFrei
This commit is contained in:
@@ -573,7 +573,7 @@ var async = require('async'),
|
||||
Groups.exists(groupName, function(err, exists) {
|
||||
if (exists) {
|
||||
db.setAdd('group:' + groupName + ':members', uid, callback);
|
||||
plugins.fireHook('action:groups.join', {
|
||||
plugins.fireHook('action:group.join', {
|
||||
groupName: groupName,
|
||||
uid: uid
|
||||
});
|
||||
@@ -589,7 +589,7 @@ var async = require('async'),
|
||||
|
||||
Groups.hide(groupName);
|
||||
db.setAdd('group:' + groupName + ':members', uid, callback);
|
||||
plugins.fireHook('action:groups.join', {
|
||||
plugins.fireHook('action:group.join', {
|
||||
groupName: groupName,
|
||||
uid: uid
|
||||
});
|
||||
@@ -601,7 +601,7 @@ var async = require('async'),
|
||||
Groups.requestMembership = function(groupName, uid, callback) {
|
||||
if (parseInt(uid, 10) > 0) {
|
||||
db.setAdd('group:' + groupName + ':pending', uid, callback);
|
||||
plugins.fireHook('action:groups.requestMembership', {
|
||||
plugins.fireHook('action:group.requestMembership', {
|
||||
groupName: groupName,
|
||||
uid: uid
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user