mirror of
https://codeberg.org/fediverse/fep.git
synced 2026-08-05 11:46:04 +00:00
Add FEP-82f6: Actor statuses (#596)
This proposal describes an ActivityPub extension to allow actors to publish a short status text, with optional expiration, link attachment, and history. Some centralized communication services provide their users with the ability to set a status on their account, which is usually displayed on their profile and sometimes next to their name in other places in the UI. These are distinct from regular posts because they can not be interacted with in any way whatsoever, can't contain media attachments, and usually have a short character limit on the order of several hundred characters at most. Statuses are always visible to anyone who can see the actor itself. Co-authored-by: Grishka <git@grishka.me> Reviewed-on: https://codeberg.org/fediverse/fep/pulls/596 Co-authored-by: grishka <grishka@noreply.codeberg.org> Co-committed-by: grishka <grishka@noreply.codeberg.org>
This commit is contained in:
@@ -0,0 +1,109 @@
|
||||
---
|
||||
slug: "82f6"
|
||||
authors: Gregory Klyushnikov <activitypub@grishka.me>
|
||||
status: DRAFT
|
||||
dateReceived: 1970-01-01
|
||||
discussionsTo: https://socialhub.activitypub.rocks/t/fep-82f6-actor-statuses/5310
|
||||
---
|
||||
# FEP-82f6: Actor statuses
|
||||
|
||||
|
||||
## Summary
|
||||
|
||||
This proposal describes an ActivityPub extension to allow actors to publish a short status text, with optional expiration, link attachment, and history.
|
||||
|
||||
Some centralized communication services provide their users with the ability to set a status on their account, which is usually displayed on their profile and sometimes next to their name in other places in the UI. These are distinct from regular posts because they can not be interacted with in any way whatsoever, can't contain media attachments, and usually have a short character limit on the order of several hundred characters at most. Statuses are always visible to anyone who can see the actor itself.
|
||||
|
||||
## Requirements
|
||||
|
||||
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this specification are to be interpreted as described in [RFC-2119].
|
||||
|
||||
## Representation of statuses
|
||||
|
||||
A status object is of type `sm:ActorStatus`, which extends the ActivityPub `Object`. It has the following fields:
|
||||
|
||||
- `content`: the plain text content of the status. REQUIRED.
|
||||
- `published`: the timestamp when this status update was created. REQUIRED.
|
||||
- `id`: a unique identifier for this status update. REQUIRED.
|
||||
- `endTime`: a timestamp when this status expires. OPTIONAL. If present, an implementation MUST check this field and, if it is in the past, MUST NOT display this status on the actor's profile and in any other places where statuses are displayed.
|
||||
- `attachment`: an object that contains any extra information about what the actor is currently doing, e.g. a song they're listening to or a video game they're playing. OPTIONAL. If present, `content` MUST contain a fallback human-readable plain text representation of this object. For example, for a song, it may simply be "Artist — Title".
|
||||
|
||||
## Actor fields
|
||||
|
||||
The following two OPTIONAL fields are added to actors:
|
||||
|
||||
- `sm:status`: the last, or current, status update of this actor. SHOULD NOT be present if the last status has expired. SHOULD contain an inlined `sm:ActorStatus`.
|
||||
- `sm:statusHistory`: a collection of all past status updates of this actor. If present, implementations MAY provide a UI to view this actor's status history. If absent, implementations SHOULD NOT store this actor's past status updates and MUST NOT expose them in the UI.
|
||||
|
||||
## Activities
|
||||
|
||||
### Creating a status update
|
||||
|
||||
A status update is created by sending a `Create{sm:ActorStatus}` activity to followers. Upon receiving this activity, an implementation updates the actor's latest status, and, if it has the `sm:statusHistory` collection, adds it to the history. After sending this activity, the `sm:status` field of the actor object MUST be updated with this new status. An `Update{Actor}` MUST NOT be sent because the `Create` already implicitly updates that field in the copies of this actor stored on remote servers.
|
||||
|
||||
### Clearing the status
|
||||
|
||||
The latest status is cleared by sending a `Remove{sm:ActorStatus}` activity to followers. Upon receiving this activity, if the ID of the `object` matches the actor's current status, an implementation removes the actor's current status. If the actor has the `sm:statusHistory` collection, it keeps it there. Same considerations for `sm:status` apply here.
|
||||
|
||||
### Deleting the status
|
||||
|
||||
A status is completely deleted by sending a `Delete{sm:ActorStatus}` activity to followers. If the actor has the `sm:statusHistory` collection, the status is removed from there as well as being cleared from the profile. Otherwise, this is activity is identical to `Remove`.
|
||||
|
||||
### Other activities in relation to statuses
|
||||
|
||||
Statuses can not be interacted with. Therefore, implementations SHOULD NOT send any activities that refer to statuses as their `object` attributed to actors other than the actor that owns this status. Implementations MUST either ignore any such activities by returning a 2xx response, or reject them by returning a 4xx.
|
||||
|
||||
Once published, a status object can not be `Update`d.
|
||||
|
||||
## Context
|
||||
|
||||
The JSON-LD context for this proposal is as follows:
|
||||
```json
|
||||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
{
|
||||
"sm": "http://smithereen.software/ns#",
|
||||
"ActorStatus": "sm:ActorStatus",
|
||||
"status": {
|
||||
"@type": "@id",
|
||||
"@id": "sm:status"
|
||||
},
|
||||
"statusHistory": {
|
||||
"@type": "@id",
|
||||
"@id": "sm:statusHistory"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Character limit
|
||||
|
||||
Implementations MUST support statuses of up to 100 characters or emoji. Implementations MAY allow statuses that are longer, but they MAY be truncated on the receiving side depending on display and storage constraints. It is RECOMMENDED to apply a 100-character limit to the text field where the user enters their status, but be more permissive when processing status updates from other servers.
|
||||
|
||||
## UI examples
|
||||
*This section is non-normative.*
|
||||
|
||||
This section shows examples of how implementations might display status updates to users.
|
||||
|
||||
Simple UI without history, similar to Discord or GitHub:
|
||||

|
||||
|
||||
Updating one's status, with the ability to set it to expire:
|
||||

|
||||
|
||||
UI with history, similar to early Facebook:
|
||||

|
||||
|
||||
## References
|
||||
|
||||
- Christine Lemmer-Webber, Jessica Tallon, Erin Shepherd, Amy Guy, Evan Prodromou, [ActivityPub], 2018
|
||||
|
||||
[ActivityPub]: https://www.w3.org/TR/activitypub/
|
||||
|
||||
## Copyright
|
||||
|
||||
CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
|
||||
|
||||
To the extent possible under law, the authors of this Fediverse Enhancement Proposal have waived all copyright and related or neighboring rights to this work.
|
||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 5.8 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5" viewBox="0 0 400 381"><path d="M0 0h400v381H0z" style="fill:none"/><path d="M389 42.5c0-16.557-13.443-30-30-30H44c-16.557 0-30 13.443-30 30V336c0 16.557 13.443 30 30 30h315c16.557 0 30-13.443 30-30z" style="fill:#fff"/><path d="M389 42.5c0-16.557-13.443-30-30-30H44c-16.557 0-30 13.443-30 30V336c0 16.557 13.443 30 30 30h315c16.557 0 30-13.443 30-30zm-2 0V336c0 15.454-12.546 28-28 28H44c-15.454 0-28-12.546-28-28V42.5c0-15.454 12.546-28 28-28h315c15.454 0 28 12.546 28 28"/><text x="450.422" y="196.861" style="font-family:"ArialMT","Arial",sans-serif;font-size:14px" transform="translate(-379)">Never</text><text x="450.422" y="225.777" style="font-family:"ArialMT","Arial",sans-serif;font-size:14px" transform="translate(-379)">After 1 hour</text><text x="450.422" y="254.693" style="font-family:"ArialMT","Arial",sans-serif;font-size:14px" transform="translate(-379)">After 12 hours</text><text x="450.422" y="283.609" style="font-family:"ArialMT","Arial",sans-serif;font-size:14px" transform="translate(-379)">Next Monday</text><circle cx="54.929" cy="191.5" r="11.5" style="fill:#fff"/><path d="M54.929 180c6.347 0 11.5 5.153 11.5 11.5s-5.153 11.5-11.5 11.5-11.5-5.153-11.5-11.5 5.153-11.5 11.5-11.5m0 2c5.243 0 9.5 4.257 9.5 9.5s-4.257 9.5-9.5 9.5-9.5-4.257-9.5-9.5 4.257-9.5 9.5-9.5"/><circle cx="54.929" cy="221.5" r="11.5" style="fill:#fff"/><path d="M54.929 210c6.347 0 11.5 5.153 11.5 11.5s-5.153 11.5-11.5 11.5-11.5-5.153-11.5-11.5 5.153-11.5 11.5-11.5m0 2c5.243 0 9.5 4.257 9.5 9.5s-4.257 9.5-9.5 9.5-9.5-4.257-9.5-9.5 4.257-9.5 9.5-9.5"/><circle cx="54.929" cy="249.5" r="11.5" style="fill:#fff"/><path d="M54.929 238c6.347 0 11.5 5.153 11.5 11.5s-5.153 11.5-11.5 11.5-11.5-5.153-11.5-11.5 5.153-11.5 11.5-11.5m0 2c5.243 0 9.5 4.257 9.5 9.5s-4.257 9.5-9.5 9.5-9.5-4.257-9.5-9.5 4.257-9.5 9.5-9.5"/><circle cx="54.929" cy="277.5" r="11.5" style="fill:#fff"/><path d="M54.929 266c6.347 0 11.5 5.153 11.5 11.5s-5.153 11.5-11.5 11.5-11.5-5.153-11.5-11.5 5.153-11.5 11.5-11.5m0 2c5.243 0 9.5 4.257 9.5 9.5s-4.257 9.5-9.5 9.5-9.5-4.257-9.5-9.5 4.257-9.5 9.5-9.5"/><path d="M43.429 100H362v35.5H43.429z" style="fill:#fff"/><path d="M362 100H43.429v35.5H362zm-2 2v31.5H45.429V102z"/><path d="M289.429 308H366v35.5h-76.571z" style="fill:#fff"/><path d="M366 308h-76.571v35.5H366zm-2 2v31.5h-72.571V310z"/><text x="296.543" y="330.761" style="font-family:"ArialMT","Arial",sans-serif;font-size:14px">Set status</text><path d="M191.429 308H268v35.5h-76.571z" style="fill:#fff"/><path d="M268 308h-76.571v35.5H268zm-2 2v31.5h-72.571V310z"/><text x="208.069" y="330.761" style="font-family:"ArialMT","Arial",sans-serif;font-size:14px">Cancel</text><text x="54.729" y="122.652" style="font-family:"Arial-ItalicMT","Arial",sans-serif;font-style:italic;font-size:14px;fill:gray">What's happening?</text><path d="M15 75h372" style="fill:none;stroke:#000;stroke-width:2px"/><text x="41.974" y="55.312" style="font-family:"Arial-BoldMT","Arial",sans-serif;font-weight:700;font-size:20px">Edit status</text><text x="42.732" y="166.786" style="font-family:"ArialMT","Arial",sans-serif;font-size:14px">Clear status:</text><circle cx="54.929" cy="191.5" r="6.5"/></svg>
|
||||
|
After Width: | Height: | Size: 3.4 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 300 200"><path d="M0 0h300v200H0z" style="fill:#fff"/><path d="M132 94.5c0-16.557-13.443-30-30-30H42c-16.557 0-30 13.443-30 30v60c0 16.557 13.443 30 30 30h60c16.557 0 30-13.443 30-30zm-2 0v60c0 15.454-12.546 28-28 28H42c-15.454 0-28-12.546-28-28v-60c0-15.454 12.546-28 28-28h60c15.454 0 28 12.546 28 28"/><path d="M72.5 88.5C85.47 88.5 96 99.03 96 112s-10.53 23.5-23.5 23.5S49 124.97 49 112s10.53-23.5 23.5-23.5m0 2c11.866 0 21.5 9.634 21.5 21.5s-9.634 21.5-21.5 21.5S51 123.866 51 112s9.634-21.5 21.5-21.5"/><path d="M72.5 88.5C85.47 88.5 96 99.03 96 112s-10.53 23.5-23.5 23.5S49 124.97 49 112s10.53-23.5 23.5-23.5m0 2c11.866 0 21.5 9.634 21.5 21.5s-9.634 21.5-21.5 21.5S51 123.866 51 112s9.634-21.5 21.5-21.5M24.915 179.137C30.754 156.267 49.863 139.5 72.5 139.5c22.427 0 41.39 16.456 47.436 39-4.986 3.778-11.204 6-17.936 6H42a29.7 29.7 0 0 1-17.085-5.363m2.305-.872C33.225 157 51.212 141.5 72.5 141.5c21.097 0 38.952 15.224 45.132 36.195-4.452 3.041-9.838 4.805-15.632 4.805H42a27.73 27.73 0 0 1-14.78-4.234z"/><path d="M165 36c0-12.97-10.53-23.5-23.5-23.5h-106C22.53 12.5 12 23.03 12 36s10.53 23.5 23.5 23.5h2.753l21.965 27-6.661-27H141.5c12.97 0 23.5-10.53 23.5-23.5" style="fill:#fff"/><path d="M165 36c0-12.97-10.53-23.5-23.5-23.5h-106C22.53 12.5 12 23.03 12 36s10.53 23.5 23.5 23.5h2.753l21.965 27-6.661-27H141.5c12.97 0 23.5-10.53 23.5-23.5m-2 0c0 11.866-9.634 21.5-21.5 21.5H53.557a2 2 0 0 0-1.942 2.479l4.524 18.338-16.335-20.079a2 2 0 0 0-1.551-.738H35.5C23.634 57.5 14 47.866 14 36s9.634-21.5 21.5-21.5h106c11.866 0 21.5 9.634 21.5 21.5"/><text x="143.658" y="149.816" style="font-family:"Arial-BoldMT","Arial",sans-serif;font-weight:700;font-size:20px">John <tspan x="196.246px 210.689px" y="149.816px 149.816px">Ap</tspan>pleseed</text><text x="144.608" y="173.57" style="font-family:"ArialMT","Arial",sans-serif;font-size:12px;fill:gray">@john@example.social</text><text x="23.613" y="38.751" style="font-family:"ArialMT","Arial",sans-serif;font-size:12px">Fediverse will prevail</text></svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
Reference in New Issue
Block a user