-
Notifications
You must be signed in to change notification settings - Fork 7
Add CommunityActivity ontology + optional responseOptions on CalendarEvent #1091
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
coodos
merged 2 commits into
MetaState-Prototype-Project:main
from
EgorPPS:meshenger-community-activity
Jul 24, 2026
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema#", | ||
| "schemaId": "c0117a17-1b2c-4d3e-8f4a-5b6c7d8e9f01", | ||
| "title": "CommunityActivity", | ||
| "type": "object", | ||
| "description": "A generic, domain-level 'a platform posted something to a community that members see and may respond to'. NOT a presentation container: activityType follows W3C ActivityStreams and carries the meaning; the renderer decides the look. Prefer a more specific ontology when one fits (CalendarEvent, Poll). CommunityActivity is the general case AND the fallback a renderer uses for any envelope it doesn't specifically know but that carries summary + responseOptions. Responses are recorded as separate Relation envelopes (predicate 'respond'), authored by the responder.", | ||
| "properties": { | ||
| "id": { "type": "string" }, | ||
| "chatId": { "type": "string", "description": "The chat this activity surfaces in" }, | ||
| "activityType": { | ||
| "type": "string", | ||
| "enum": ["announce", "question", "offer", "invite", "acknowledge"], | ||
| "description": "W3C ActivityStreams verb — the semantics of the activity" | ||
| }, | ||
| "summary": { "type": "string", "description": "Human-visible headline (domain field, not 'title')" }, | ||
| "description": { "type": "string" }, | ||
| "relatedSubject": { | ||
| "type": "object", | ||
| "description": "Optional pointer to the domain object this activity is about", | ||
| "properties": { | ||
| "id": { "type": "string" }, | ||
| "ontologyId": { "type": "string" }, | ||
| "canonicalOwnerEName": { "type": "string" }, | ||
| "canonicalEnvelopeId": { "type": ["string", "null"] }, | ||
| "type": { "type": "string" } | ||
| }, | ||
| "required": ["id"] | ||
| }, | ||
| "responseOptions": { | ||
| "type": "array", | ||
| "description": "Optional choices the reader can respond with. A tap is recorded as a Relation (predicate 'respond', object = this envelope's uri, value = the chosen option value/id). Single mutually-exclusive choice only. Poll/Vote do NOT use this — they model options natively.", | ||
| "items": { | ||
| "type": "object", | ||
| "properties": { | ||
| "id": { "type": "string", "description": "Stable id; group responses by this (or value) for a tally" }, | ||
| "label": { "type": "string", "description": "Human-visible button text" }, | ||
| "value": { "type": "string", "description": "Semantic value recorded in the response (defaults to id)" }, | ||
| "kind": { "type": "string", "enum": ["choice"], "default": "choice" } | ||
| }, | ||
| "required": ["id", "label"] | ||
| } | ||
| }, | ||
| "display": { | ||
| "type": "object", | ||
| "description": "Presentation HINTS only — renderers MAY ignore. Keeps UI out of the domain fields", | ||
| "properties": { | ||
| "pinned": { "type": "boolean" }, | ||
| "removable": { "type": "boolean" }, | ||
| "category": { "type": "string" } | ||
| } | ||
| }, | ||
| "authorEName": { "type": "string", "description": "eName of the producing platform/app" }, | ||
| "createdAt": { "type": "string", "format": "date-time" }, | ||
| "isArchived": { "type": "boolean", "default": false } | ||
| }, | ||
| "required": ["id", "chatId", "activityType", "summary", "createdAt"], | ||
| "additionalProperties": true | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
sed -n '1,120p' services/ontology/schemas/communityActivity.jsonRepository: MetaState-Prototype-Project/prototype
Length of output: 3342
🌐 Web query:
W3C ActivityStreams activity type vocabulary Announce Question Offer Invite Acknowledge💡 Result:
In the W3C ActivityStreams 2.0 vocabulary, the types Announce, Question, Offer, Invite, and Acknowledge are handled as follows: Announce: This is a defined Activity type [1][2]. It indicates that the actor is calling attention to the object [1]. It inherits all properties from the base Activity type [1][3]. Question: This is a defined Activity type [1][2]. It represents a question being asked [3]. It inherits all properties from the base Activity type [1][4]. Offer: This is a defined Activity type [1][2]. It indicates that the actor is offering the object [1]. If specified, the target indicates the entity to which the object is being offered [1]. It inherits all properties from the base Activity type [1]. Invite: This is a defined Activity type [1][2]. It is a specialization of the Offer activity type [1][3]. It indicates that the actor is extending an invitation for the object to the target [1]. It inherits all properties from the Offer activity type [1]. Acknowledge: This activity type is not part of the W3C ActivityStreams 2.0 vocabulary [1][5][6]. All Activity types in the W3C ActivityStreams 2.0 vocabulary inherit from the base Activity type, which itself is derived from the Object type [1][7]. Specific specializations exist, such as Invite being a form of Offer [1][2].
Citations:
Use canonical ActivityStreams activity names.
activityTypeclaims W3C ActivityStreams semantics, but the enum uses project-local lowercase slugs and includesacknowledge, which is not a W3C ActivityStreams activity type. If this field is meant to interoperate, use the standard terms (Announce,Question,Offer,Invite) and dropacknowledge, or rename the field to make the mapping explicit.🤖 Prompt for AI Agents