Page MenuHomePhabricator

Ability to join or decline an event
ClosedPublic

Authored by lpriestley on Apr 29 2015, 11:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 22, 4:40 PM
Unknown Object (File)
Mon, Dec 16, 5:18 PM
Unknown Object (File)
Sun, Dec 15, 3:32 PM
Unknown Object (File)
Thu, Dec 12, 10:13 AM
Unknown Object (File)
Tue, Dec 10, 5:28 PM
Unknown Object (File)
Sun, Dec 8, 12:28 AM
Unknown Object (File)
Fri, Dec 6, 4:10 AM
Unknown Object (File)
Tue, Nov 26, 1:31 PM
Subscribers

Details

Summary

Ref T7986, Ability to join or decline an event.

Test Plan

Open Calendar event, join event, Invitee list should update. Decline event, invitee list should remove you.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lpriestley retitled this revision from to Ability to join or decline an event.
lpriestley updated this object.
lpriestley edited the test plan for this revision. (Show Details)
lpriestley added a reviewer: epriestley.
epriestley edited edge metadata.

Some nitpicks / suggestions, didn't catch anything substantive.

src/applications/calendar/controller/PhabricatorCalendarEventJoinController.php
7–14

For modern controllers, you can simplify this a bit. Instead of processRequest(), do:

public function handleRequest(AphrontRequest $request) {

Then do this to read the 'id' value:

$request->getURIData('id');
15

In modern code, prefer:

$viewer = $this->getViewer();
22–26

You can remove this, since we aren't requiring CAN_EDIT to join events (just CAN_VIEW).

39

Unused.

70

You can just omit this, the default button name is "Cancel" if you don't pass an alternate name.

src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
72

Now unused.

99

Is there a better icon for this? fa-user-minus or something?

101

No need for $can_edit to join events.

109

As above.

src/applications/calendar/storage/PhabricatorCalendarEvent.php
137–138

If something passes a bad PHID, this could fatal. Maybe do this between these lines:

if (!$invited) {
  return blahblah::STATUS_UNINVITED;
}
This revision is now accepted and ready to land.Apr 29 2015, 11:44 PM
lpriestley marked 10 inline comments as done.
lpriestley edited edge metadata.

Code clean up. Users can now join/decline events.

This revision was automatically updated to reflect the committed changes.