WPB-24074: Add Wire Meetings add invitation endpoint#5132
WPB-24074: Add Wire Meetings add invitation endpoint#5132blackheaven merged 4 commits intodevelopfrom
Conversation
battermann
left a comment
There was a problem hiding this comment.
My main concern is that the domain is unused.
Approved proforma.
changelog.d/2-features/WPB-24074
Outdated
| @@ -0,0 +1 @@ | |||
| Add Wire Meetings add invitation endpoint `POST /meetings/<domain>/<id>/invitations` | |||
There was a problem hiding this comment.
I have seen this with curly braces and colons, maybe we should stick to that? (super nit-pick)
| Add Wire Meetings add invitation endpoint `POST /meetings/<domain>/<id>/invitations` | |
| Add Wire Meetings add invitation endpoint `POST /meetings/:domain/:id/invitations` |
| :> From 'V16 | ||
| :> ZLocalUser | ||
| :> "meetings" | ||
| :> Capture "domain" Domain |
There was a problem hiding this comment.
Why is the domain part of the path? Can I invite someone to a meeting on a remote backend?
There was a problem hiding this comment.
Not yet, but it may be at some point
| r1 <- postMeetings owner newMeeting | ||
| assertSuccess r1 | ||
| meeting <- assertOne r1.json |
There was a problem hiding this comment.
| r1 <- postMeetings owner newMeeting | |
| assertSuccess r1 | |
| meeting <- assertOne r1.json | |
| meeting <- postMeetings owner newMeeting >>= getJSON 200 >>= assertOne |
just a suggestion. (very nit-picky)
There was a problem hiding this comment.
It does not work since getJSON 200 :: App Value
| addInvitedEmailsImpl zUser meetingId emails validityPeriod = do | ||
| result <- | ||
| runMaybeT $ do | ||
| storedMeeting <- MaybeT $ Store.getMeeting (qUnqualified meetingId) |
There was a problem hiding this comment.
Domain is removed here, so it does not seem necessary.
There was a problem hiding this comment.
I have added a guard until we handle it
| let cutoff = addUTCTime (negate validityPeriod) now | ||
| guard $ storedMeeting.endTime >= cutoff | ||
| guard $ storedMeeting.creator == tUnqualified zUser | ||
| lift $ Store.addInvitedEmails (qUnqualified meetingId) emails |
There was a problem hiding this comment.
What if email is already invited? Can this happen? Should we handle this case?
There was a problem hiding this comment.
It's niot specified, but Store deduplicate it
https://wearezeta.atlassian.net/browse/WPB-24074
Checklist
changelog.d