|
|
|
@ -51,7 +51,7 @@ module.exports = function (Groups) {
|
|
|
|
|
|
|
|
|
|
Groups.invite = async function (groupName, uids) {
|
|
|
|
|
uids = Array.isArray(uids) ? uids : [uids];
|
|
|
|
|
await inviteOrRequestMembership(groupName, uids, 'invite');
|
|
|
|
|
uids = await inviteOrRequestMembership(groupName, uids, 'invite');
|
|
|
|
|
|
|
|
|
|
const notificationData = await Promise.all(uids.map(uid => notifications.create({
|
|
|
|
|
type: 'group-invite',
|
|
|
|
@ -87,6 +87,7 @@ module.exports = function (Groups) {
|
|
|
|
|
groupName: groupName,
|
|
|
|
|
uids: uids,
|
|
|
|
|
});
|
|
|
|
|
return uids;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Groups.isInvited = async function (uids, groupName) {
|
|
|
|
|