AlreadyRequested
error AlreadyRequested()
"User has already requested to join"
RequestAlreadyAccepted
error RequestAlreadyAccepted()
"User join request is already accepted"
RequestNotFound
error RequestNotFound()
"User join request is not found"
JoinRequestsFacet
Facet that lets read, create, update and delete join requests.
JoinRequest
event JoinRequest(address member)
Emitted when a user requests to join a private party
Parameters
Name | Type | Description |
---|---|---|
member | address | Address of the user requesting to join |
HandleJoinRequest
event HandleJoinRequest(address member, bool accepted)
Emitted when a join requests gets accepted or rejected
Parameters
Name | Type | Description |
---|---|---|
member | address | Address of the user that requested to join |
accepted | bool | Whether the request was accepted or rejected |
getJoinRequests
function getJoinRequests() external view returns (address[])
Gets the party pending join requests
Return Values
Name | Type | Description |
---|---|---|
[0] | address[] | Array of join requests that are pending |
isAcceptedRequest
function isAcceptedRequest(address user) external view returns (bool)
Checks if the pending join request was accepted
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | Whether if a given user has an accepted join request |
createJoinRequest
function createJoinRequest() external
Requests to join a party
Only non Party Members are the only allowed to request to join
handleJoinRequest
function handleJoinRequest(bool accepted, address user) external
Handles a join request to party
Only Party Managers are the only allowed to handle requests
Parameters
Name | Type | Description |
---|---|---|
accepted | bool | True if request should be accepted. Otherwise, it's discarted |
user | address | Accound address of the request |