1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-07-11 20:32:48 +00:00

Can invite a user to join a group

This commit is contained in:
2019-12-26 17:55:29 +01:00
parent a258f949c1
commit 33b01207d3
3 changed files with 38 additions and 0 deletions

@ -158,6 +158,23 @@ export class GroupsHelper {
return result.visibility;
}
/**
* Invite a user to join a group
*
* @param groupID The ID of the target group
* @param userID The ID of the target user
*/
public static async SendInvitation(groupID: number, userID: number) {
await this.InsertMember(new GroupMember({
id: -1,
userID: userID,
groupID: groupID,
timeCreate: time(),
following: true,
level: GroupMembershipLevels.INVITED
}));
}
/**
* Insert a new group member
*