Skip to content

WPB-24074: Add Wire Meetings add invitation endpoint#5132

Merged
blackheaven merged 4 commits intodevelopfrom
gdifolco/WPB-24074-meetings-invitation-add
Mar 19, 2026
Merged

WPB-24074: Add Wire Meetings add invitation endpoint#5132
blackheaven merged 4 commits intodevelopfrom
gdifolco/WPB-24074-meetings-invitation-add

Conversation

@blackheaven
Copy link
Contributor

https://wearezeta.atlassian.net/browse/WPB-24074

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@blackheaven blackheaven requested review from a team as code owners March 18, 2026 15:22
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Mar 18, 2026
Copy link
Contributor

@battermann battermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My main concern is that the domain is unused.

Approved proforma.

@@ -0,0 +1 @@
Add Wire Meetings add invitation endpoint `POST /meetings/<domain>/<id>/invitations`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have seen this with curly braces and colons, maybe we should stick to that? (super nit-pick)

Suggested change
Add Wire Meetings add invitation endpoint `POST /meetings/<domain>/<id>/invitations`
Add Wire Meetings add invitation endpoint `POST /meetings/:domain/:id/invitations`

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

:> From 'V16
:> ZLocalUser
:> "meetings"
:> Capture "domain" Domain
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the domain part of the path? Can I invite someone to a meeting on a remote backend?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet, but it may be at some point

Comment on lines +276 to +278
r1 <- postMeetings owner newMeeting
assertSuccess r1
meeting <- assertOne r1.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
r1 <- postMeetings owner newMeeting
assertSuccess r1
meeting <- assertOne r1.json
meeting <- postMeetings owner newMeeting >>= getJSON 200 >>= assertOne

just a suggestion. (very nit-picky)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not work since getJSON 200 :: App Value

addInvitedEmailsImpl zUser meetingId emails validityPeriod = do
result <-
runMaybeT $ do
storedMeeting <- MaybeT $ Store.getMeeting (qUnqualified meetingId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Domain is removed here, so it does not seem necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if email is already invited? Can this happen? Should we handle this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's niot specified, but Store deduplicate it

@blackheaven blackheaven merged commit b7f48de into develop Mar 19, 2026
10 checks passed
@blackheaven blackheaven deleted the gdifolco/WPB-24074-meetings-invitation-add branch March 19, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants