Fix 1586 Docs: provide a index.md
[akkoma] / docs / ap_extensions.md
1 # ChatMessages
2
3 ChatMessages are the messages sent in 1-on-1 chats. They are similar to
4 `Note`s, but the addresing is done by having a single AP actor in the `to`
5 field. Addressing multiple actors is not allowed. These messages are always
6 private, there is no public version of them. They are created with a `Create`
7 activity.
8
9 Example:
10
11 ```json
12 {
13 "actor": "http://2hu.gensokyo/users/raymoo",
14 "id": "http://2hu.gensokyo/objects/1",
15 "object": {
16 "attributedTo": "http://2hu.gensokyo/users/raymoo",
17 "content": "You expected a cute girl? Too bad.",
18 "id": "http://2hu.gensokyo/objects/2",
19 "published": "2020-02-12T14:08:20Z",
20 "to": [
21 "http://2hu.gensokyo/users/marisa"
22 ],
23 "type": "ChatMessage"
24 },
25 "published": "2018-02-12T14:08:20Z",
26 "to": [
27 "http://2hu.gensokyo/users/marisa"
28 ],
29 "type": "Create"
30 }
31 ```
32
33 This setup does not prevent multi-user chats, but these will have to go through
34 a `Group`, which will be the recipient of the messages and then `Announce` them
35 to the users in the `Group`.