All the details of an invitation received by the current user.
More...
#include <Invitation.h>
All the details of an invitation received by the current user.
An invitation is sent with a requests::inv::InviteUsersRequest or a requests::inv::JoinRoomInvitationRequest, and it arrives as a event::SFSEvent::INVITATION event. The client replies to it with a requests::inv::InvitationReplyRequest, inside the number of seconds given by Invitation::getSecondsForAnswer. After that, the server treats the invitation as refused.
NOTE: you never create an Invitation yourself. The API does it for you, and the INVITATION event carries it.
- See also
- requests::inv::InviteUsersRequest
-
requests::inv::InvitationReplyRequest
-
event::SFSEvent::INVITATION
◆ getId()
| int32_t sfs3::entities::Invitation::getId |
( |
| ) |
const |
|
inline |
- Returns
- the id of this invitation, generated by the server when the invitation is sent. It identifies the invitation in the reply sent back to the inviter.
◆ getInviter()
| std::shared_ptr< User > sfs3::entities::Invitation::getInviter |
( |
| ) |
const |
|
inline |
Returns the user who sent the invitation.
When the inviter is unknown to this client (he is in none of the Rooms the client joined) this is a detached snapshot built from the invitation itself, not a managed instance: it carries the inviter's id, name and privileges and nothing else.
- Returns
- the inviter
◆ getInvitee()
| std::shared_ptr< User > sfs3::entities::Invitation::getInvitee |
( |
| ) |
const |
|
inline |
- Returns
- the user who received the invitation, which is always the current user
◆ getSecondsForAnswer()
| int32_t sfs3::entities::Invitation::getSecondsForAnswer |
( |
| ) |
const |
|
inline |
- Returns
- the number of seconds the invitee has to reply, after which the invitation expires
◆ getParams()
| std::shared_ptr< SFSObject > sfs3::entities::Invitation::getParams |
( |
| ) |
const |
|
inline |
- Returns
- the custom parameters the inviter attached to the invitation, usually a message to the invitee and any other useful detail, or
nullptr if there are none
◆ toString()
| std::string sfs3::entities::Invitation::toString |
( |
| ) |
const |
|
inline |
- Returns
- the details of this invitation as text, for logging and debugging
The documentation for this class was generated from the following file: