@activitypods/events 中文文档教程

发布于 3年前 浏览 13 更新于 3年前

Events App

用于处理事件的 ActivityPods 应用程序,包括邀请和注册。

Services

Dependencies

Containers

  • /events with the events created by the user or to whom he has been invited

Collections

附加到所有事件:

  • /invitees with the list of actors who have been invited to the event
  • /inviters with the list of actors who are allowed to invite to the event
  • /attendees with the list of actors who are attending the event (including the organizer)

Ontology

Handled activities

Invite to event

{
  "type": "Invite",
  "object": {
    "type": "Event"
  }
}

Emitter's side effects

  • The recipients are added to the /invitees collection.
  • The recipients are added to a WebACL group which can view the event and the /attendees collection.

Recipients' side effects

  • The event is cached in the recipients' PODs
  • Notifications are sent to the recipients

Offer to invite to event

{
  "type": "Offer",
  "object": {
    "type": "Invite",
    "object": {
      "type": "Event"
    }
  }
}

Emitter's side effects

  • If the offer is sent by the event organizer, it means he wants to give invitees the right to share this event
  • The recipients are added to the /inviters collection.
  • The recipients are added to a WebACL group which can view the /invitees collection.

Recipients' side effects

  • If the offer is sent to the organizer, it means we are an inviter and want him to invite one of our contacts
  • The organizer sends an invitation to the actor specified by the inviter
  • The inviter is informed his invitation has been accepted (via an Accept activity)

Join event

{
  "type": "Join",
  "object": {
    "type": "Event"
  }
}

Emitter's side effects

  • None

Recipients' side effects

  • The recipients are added to the /attendees collection
  • A notification is sent to the organizer

Leave event

{
  "type": "Leave",
  "object": {
    "type": "Event"
  }
}

Emitter's side effects

  • None

Recipients' side effects

  • The recipients are removed from the /attendees collection
  • A notification is sent to the organizer

Events App

An ActivityPods app to handle events, with invitation and registration.

Services

Dependencies

Containers

  • /events with the events created by the user or to whom he has been invited

Collections

Attached to all events:

  • /invitees with the list of actors who have been invited to the event
  • /inviters with the list of actors who are allowed to invite to the event
  • /attendees with the list of actors who are attending the event (including the organizer)

Ontology

Handled activities

Invite to event

{
  "type": "Invite",
  "object": {
    "type": "Event"
  }
}

Emitter's side effects

  • The recipients are added to the /invitees collection.
  • The recipients are added to a WebACL group which can view the event and the /attendees collection.

Recipients' side effects

  • The event is cached in the recipients' PODs
  • Notifications are sent to the recipients

Offer to invite to event

{
  "type": "Offer",
  "object": {
    "type": "Invite",
    "object": {
      "type": "Event"
    }
  }
}

Emitter's side effects

  • If the offer is sent by the event organizer, it means he wants to give invitees the right to share this event
  • The recipients are added to the /inviters collection.
  • The recipients are added to a WebACL group which can view the /invitees collection.

Recipients' side effects

  • If the offer is sent to the organizer, it means we are an inviter and want him to invite one of our contacts
  • The organizer sends an invitation to the actor specified by the inviter
  • The inviter is informed his invitation has been accepted (via an Accept activity)

Join event

{
  "type": "Join",
  "object": {
    "type": "Event"
  }
}

Emitter's side effects

  • None

Recipients' side effects

  • The recipients are added to the /attendees collection
  • A notification is sent to the organizer

Leave event

{
  "type": "Leave",
  "object": {
    "type": "Event"
  }
}

Emitter's side effects

  • None

Recipients' side effects

  • The recipients are removed from the /attendees collection
  • A notification is sent to the organizer
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文