Reorder comment on groupAccept
This commit is contained in:
parent
83590ba6ff
commit
a84ea09dd9
1 changed files with 70 additions and 74 deletions
|
@ -853,64 +853,34 @@ groupAdd now groupID (Verse authorIdMsig body) add = do
|
||||||
|
|
||||||
-- Meaning: An actor accepted something
|
-- Meaning: An actor accepted something
|
||||||
-- Behavior:
|
-- Behavior:
|
||||||
-- * Check if I know the activity that's being Accepted:
|
|
||||||
-- * Is it an Invite to be a collaborator in me?
|
-- * Is it an Invite to be a collaborator in me?
|
||||||
-- * Verify the Accept is by the Invite target
|
-- * Verify the Accept is by the Invite target
|
||||||
-- * Is it a Join to be a collaborator in me?
|
-- * Verify the Collab isn't enabled yet
|
||||||
-- * Verify the Accept is authorized
|
|
||||||
-- * Is it an Invite to be a component of me?
|
|
||||||
-- * Nothing to check at this point
|
|
||||||
--
|
|
||||||
-- * Give me a new child active SourceOriginUs
|
|
||||||
-- * Verify we haven't yet seen child's Accept
|
|
||||||
-- * Give me a new child passive SourceOriginThem
|
|
||||||
-- * Option 1: We haven't seen child's Accept yet
|
|
||||||
-- * Verify sender is the child
|
|
||||||
-- * Option 2: We saw it, but not my collaborator's Accept
|
|
||||||
-- * Verify the Accept is authorized
|
|
||||||
-- * Otherwise respond with error, no Accept is needed
|
|
||||||
-- * Give me a new parent active DestOriginUs
|
|
||||||
-- * Respond with error, we aren't supposed to get any Accept
|
|
||||||
-- * Give me a new parent passive DestOriginThem
|
|
||||||
-- * Option 1: I haven't yet seen parent's Accept
|
|
||||||
-- * Verify sender is the parent
|
|
||||||
-- * Option 2: I saw it, but not my collaborator's Accept
|
|
||||||
-- * Verify the accept is authorized
|
|
||||||
-- * Otherwise respond with error, no Accept is needed
|
|
||||||
--
|
|
||||||
-- * If it's none of these, respond with error
|
|
||||||
--
|
|
||||||
-- * In collab mode, verify the Collab isn't enabled yet
|
|
||||||
--
|
|
||||||
-- * Insert the Accept to my inbox
|
-- * Insert the Accept to my inbox
|
||||||
--
|
-- * Record the Accept and enable the Collab in DB
|
||||||
-- * In collab mode, record the Accept and enable the Collab in DB
|
|
||||||
--
|
|
||||||
-- * In child-active mode,
|
|
||||||
-- * If sender is the child, record the Accept into the Source record
|
|
||||||
-- * Prepare to send degelator-Grant
|
|
||||||
-- * Otherwise nothing to do
|
|
||||||
-- * In child-passive mode,
|
|
||||||
-- * Option 1: Record child's Accept in Source record
|
|
||||||
-- * Option 2: Record my collaborator's Accept
|
|
||||||
-- * Prepare to send delegator-Grant
|
|
||||||
-- * In parent-passive mode,
|
|
||||||
-- * Option 1: Record parent's Accept in the Dest record
|
|
||||||
-- * Option 2: Record my collaborator's Accept in the Dest record
|
|
||||||
-- * Prepare to send my own Accept
|
|
||||||
--
|
|
||||||
-- * Forward the Accept to my followers
|
-- * Forward the Accept to my followers
|
||||||
--
|
-- * Send a regular collaborator-Grant
|
||||||
-- * Possibly send a Grant/Accept:
|
|
||||||
-- * For Invite-collab mode:
|
|
||||||
-- * Regular collaborator-Grant
|
|
||||||
-- * To: Accepter (i.e. Invite target)
|
-- * To: Accepter (i.e. Invite target)
|
||||||
-- * CC: Invite sender, Accepter's followers, my followers
|
-- * CC: Invite sender, Accepter's followers, my followers
|
||||||
-- * For Join-as-collab mode:
|
--
|
||||||
-- * Regular collaborator-Grant
|
-- * Is it a Join to be a collaborator in me?
|
||||||
|
-- * Verify the Accept is authorized
|
||||||
|
-- * Verify the Collab isn't enabled yet
|
||||||
|
-- * Insert the Accept to my inbox
|
||||||
|
-- * Record the Accept and enable the Collab in DB
|
||||||
|
-- * Forward the Accept to my followers
|
||||||
|
-- * Send a regular collaborator-Grant
|
||||||
-- * To: Join sender
|
-- * To: Join sender
|
||||||
-- * CC: Accept sender, Join sender's followers, my followers
|
-- * CC: Accept sender, Join sender's followers, my followers
|
||||||
--
|
--
|
||||||
|
-- * Give me a new child active SourceOriginUs
|
||||||
|
-- * Verify we haven't yet seen child's Accept
|
||||||
|
-- * Insert the Accept to my inbox
|
||||||
|
-- * If sender is the child, record the Accept into the Source record
|
||||||
|
-- * Prepare to send degelator-Grant
|
||||||
|
-- * Otherwise nothing to do
|
||||||
|
-- * Forward the Accept to my followers
|
||||||
|
-- * Possibly send a Grant:
|
||||||
-- * Child-active
|
-- * Child-active
|
||||||
-- * If sender is the child
|
-- * If sender is the child
|
||||||
-- * delegator-Grant
|
-- * delegator-Grant
|
||||||
|
@ -918,7 +888,19 @@ groupAdd now groupID (Verse authorIdMsig body) add = do
|
||||||
-- * CC:
|
-- * CC:
|
||||||
-- - Child's followers
|
-- - Child's followers
|
||||||
-- - My followers
|
-- - My followers
|
||||||
-- * Child-passive
|
--
|
||||||
|
-- * Give me a new child passive SourceOriginThem
|
||||||
|
-- * Option 1: We haven't seen child's Accept yet
|
||||||
|
-- * Verify sender is the child
|
||||||
|
-- * Option 2: We saw it, but not my collaborator's Accept
|
||||||
|
-- * Verify the Accept is authorized
|
||||||
|
-- * Otherwise respond with error, no Accept is needed
|
||||||
|
-- * Insert the Accept to my inbox
|
||||||
|
-- * Option 1: Record child's Accept in Source record
|
||||||
|
-- * Option 2: Record my collaborator's Accept
|
||||||
|
-- * Prepare to send delegator-Grant
|
||||||
|
-- * Forward the Accept to my followers
|
||||||
|
-- * Possibly send a Grant:
|
||||||
-- * In option 2
|
-- * In option 2
|
||||||
-- * delegator-Grant
|
-- * delegator-Grant
|
||||||
-- * To: Child
|
-- * To: Child
|
||||||
|
@ -926,9 +908,23 @@ groupAdd now groupID (Verse authorIdMsig body) add = do
|
||||||
-- - Child's followers
|
-- - Child's followers
|
||||||
-- - My followers
|
-- - My followers
|
||||||
-- - The Accept sender (my collaborator)
|
-- - The Accept sender (my collaborator)
|
||||||
-- * Parent-passive
|
--
|
||||||
|
-- * Give me a new parent active DestOriginUs
|
||||||
|
-- * Respond with error, we aren't supposed to get any Accept
|
||||||
|
--
|
||||||
|
-- * Give me a new parent passive DestOriginThem
|
||||||
|
-- * Option 1: I haven't yet seen parent's Accept
|
||||||
|
-- * Verify sender is the parent
|
||||||
|
-- * Option 2: I saw it, but not my collaborator's Accept
|
||||||
|
-- * Verify the accept is authorized
|
||||||
|
-- * Otherwise respond with error, no Accept is needed
|
||||||
|
-- * Insert the Accept to my inbox
|
||||||
|
-- * Option 1: Record parent's Accept in the Dest record
|
||||||
|
-- * Option 2: Record my collaborator's Accept in the Dest record
|
||||||
|
-- * Prepare to send my own Accept
|
||||||
|
-- * Forward the Accept to my followers
|
||||||
|
-- * Possibly send an Accept:
|
||||||
-- * In option 2
|
-- * In option 2
|
||||||
-- * Accept
|
|
||||||
-- * Object: The Add
|
-- * Object: The Add
|
||||||
-- * Fulfills: My collaborator's Accept
|
-- * Fulfills: My collaborator's Accept
|
||||||
-- * To: Parent
|
-- * To: Parent
|
||||||
|
|
Loading…
Reference in a new issue