AcceptInvitation(senderUsername string, invitationPtr UUID, filename string) (err error)
Accepts the secure file share invitation created by
senderUsernameand located at
invitationPtrin Datastore by giving the corresponding file a name of
filenamein the caller’s personal namespace.
After this function returns successfully, the caller should be able to take the actions detailed in Sharing and Revoking. Note that the first parameter to the StoreFile(), LoadFile(), and AppendToFile() functions in the client API is a filename in the caller’s personal namespace; accepting the invitation allows the caller to choose a name for the shared file in their personal namespace.
After this function returns successfully, the given invitation is considered accepted. Calling this function on an invitation that is already accepted is undefined behavior and will not be tested, which means your client can handle that scenario in any way that you feel makes sense.
Returns an error if:
- The caller already has a file with the given
filenamein their personal file namespace.
- The caller is unable to verify that the secure file share invitation pointed to by the given
invitationPtrwas created by
- The invitation is no longer valid due to revocation.
- The caller is unable to verify the integrity of the secure file share invitation pointed to by the given
senderUsername (string) - the username of the sender
invitationPtr (UUID) - the UUID storage key at which the sender’s secure file share invitation is stored in the datastore
filename (string) - the filename that the recipient would like to assign to the shared file in their personal file namespace
- There must only be a single copy of the file.
- Users can have multiple active user sessions at once.