@activitypods/contacts 中文文档教程
Contacts App
一个 ActivityPods 应用程序,用于处理配置文件创建和联系人交换
Services
Dependencies
Containers
/profiles
with the profile of the user and his contacts (vcard:Individual
,as:Profile
)/locations
with the addresses linked to the user (vcard:Location
)
Collections
附加到参与者:
/contacts
with the list of actors whose contact has been accepted/contact-requests
with the list of contact requests activities received/rejected-contacts
with the list of actors whose contact has been rejected
Ontology
如 由 Solid 项目推荐,vCard 本体用于描述个人和位置。
Handled activities
Contact request
{
"type": "Offer",
"object": {
"type": "Add",
"object": {
"type": "Profile"
}
}
}
Emitter's side effects
- The recipients are given read access to the emitter's profile
Recipients' side effects
- The activity is added to the recipient's
/contact-requests
collection. - A notification is sent to the recipient
Accept contact request
{
"type": "Accept",
"object": {
"type": "Offer",
"object": {
"type": "Add",
"object": {
"type": "Profile"
}
}
}
}
Emitter's side effects
- The recipients are given read access to the emitter's profile
- The recipients' profiles are cached in the emitter's POD
- The recipients are attached to the emitter's
/contacts
collection - The contact request activity is removed from the emitter's
/contact-requests
collection.
Recipients' side effects
- The emitter profile is cached in the recipients' PODs
- The emitter is attached to the recipients'
/contacts
collection
Ignore contact request
{
"type": "Ignore",
"object": {
"type": "Offer",
"object": {
"type": "Add",
"object": {
"type": "Profile"
}
}
}
}
Emitter's side effects
- The contact request activity is removed from the emitter's
/contact-requests
collection.
Recipients' side effects
- The emitter lose read access to the recipient's profile
Reject contact request
{
"type": "Reject",
"object": {
"type": "Offer",
"object": {
"type": "Add",
"object": {
"type": "Profile"
}
}
}
}
Emitter's side effects
- The recipients are attached to the emitter's
/rejected-contacts
collection (new contact requests will be automatically rejected) - The contact request activity is removed from the emitter's
/contact-requests
collection.
Recipients' side effects
- The emitter lose read access to the recipient's profile
Contacts App
An ActivityPods application to handle profile creation and contacts exchange
Services
Dependencies
Containers
/profiles
with the profile of the user and his contacts (vcard:Individual
,as:Profile
)/locations
with the addresses linked to the user (vcard:Location
)
Collections
Attached to the actor:
/contacts
with the list of actors whose contact has been accepted/contact-requests
with the list of contact requests activities received/rejected-contacts
with the list of actors whose contact has been rejected
Ontology
As recommended by the Solid project, the vCard ontology is used to describe individuals as well as locations.
Handled activities
Contact request
{
"type": "Offer",
"object": {
"type": "Add",
"object": {
"type": "Profile"
}
}
}
Emitter's side effects
- The recipients are given read access to the emitter's profile
Recipients' side effects
- The activity is added to the recipient's
/contact-requests
collection. - A notification is sent to the recipient
Accept contact request
{
"type": "Accept",
"object": {
"type": "Offer",
"object": {
"type": "Add",
"object": {
"type": "Profile"
}
}
}
}
Emitter's side effects
- The recipients are given read access to the emitter's profile
- The recipients' profiles are cached in the emitter's POD
- The recipients are attached to the emitter's
/contacts
collection - The contact request activity is removed from the emitter's
/contact-requests
collection.
Recipients' side effects
- The emitter profile is cached in the recipients' PODs
- The emitter is attached to the recipients'
/contacts
collection
Ignore contact request
{
"type": "Ignore",
"object": {
"type": "Offer",
"object": {
"type": "Add",
"object": {
"type": "Profile"
}
}
}
}
Emitter's side effects
- The contact request activity is removed from the emitter's
/contact-requests
collection.
Recipients' side effects
- The emitter lose read access to the recipient's profile
Reject contact request
{
"type": "Reject",
"object": {
"type": "Offer",
"object": {
"type": "Add",
"object": {
"type": "Profile"
}
}
}
}
Emitter's side effects
- The recipients are attached to the emitter's
/rejected-contacts
collection (new contact requests will be automatically rejected) - The contact request activity is removed from the emitter's
/contact-requests
collection.
Recipients' side effects
- The emitter lose read access to the recipient's profile