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:
src
@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user