mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 17:05:51 +01:00
Group.join() callback made optional
This commit is contained in:
@@ -259,7 +259,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
Groups.join = function(groupName, uid, callback) {
|
Groups.join = function(groupName, uid, callback) {
|
||||||
Groups.exists(groupName, function(err, exists) {
|
callback = callback || function() {};
|
||||||
|
|
||||||
|
Groups.exists(groupName, function(err, exists) {
|
||||||
if (exists) {
|
if (exists) {
|
||||||
db.setAdd('group:' + groupName + ':members', uid, callback);
|
db.setAdd('group:' + groupName + ':members', uid, callback);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user