Cancelling RSVPs now seems to work.

This commit is contained in:
Mikael Nordfeldth
2016-01-20 16:10:10 +01:00
parent 9accd953e4
commit 21cc737f5c
7 changed files with 50 additions and 249 deletions

View File

@@ -208,7 +208,7 @@ class RSVP extends Managed_DataObject
return $this->event_uri;
}
static function getStored()
public function getStored()
{
return Notice::getByKeys(['uri' => $this->getUri()]);
}
@@ -218,6 +218,12 @@ class RSVP extends Managed_DataObject
return self::getByKeys(['uri' => $stored->getUri()]);
}
static function byEventAndActor(Happening $event, Profile $actor)
{
return self::getByKeys(['event_uri' => $event->getUri(),
'profile_id' => $actor->getID()]);
}
static function forEvent(Happening $event)
{
$keypart = sprintf('rsvp:for-event:%s', $event->getUri());