Brendan Abolivier 6 лет назад
Родитель
Сommit
49471e0b4d
Подписано: Brendan Abolivier <contact@brendanabolivier.com> Идентификатор ключа GPG: 8EF1500759F70623
1 измененных файлов: 1 добавлений и 1 удалений
  1. 1
    1
      content/enter-the-matrix.md

+ 1
- 1
content/enter-the-matrix.md Просмотреть файл

@@ -78,7 +78,7 @@ The unsigned property here only means the data in it mustn't be taken into accou
78 78
 The Matrix spec defines three kind of events that can pass through a room:
79 79
 
80 80
 * Timeline events, such as messages, which form the room's timeline that's shared between all homeservers in the room.
81
-* State events, that contain an additional `state_key` property, and form the current state of the room. They can describe room creation (`m.room.create`), topic edition (`m.room.topic`), join rules (i.e. either invite-only or public, `m.room.join_rules`), membersip update (i.e. join, leave, invite or ban, `m.room.member` with the Matrix ID of the user whose membership is being updated as the `state_key`). Just like timeline events, they're part of the room's timeline, but unlike them, the latest event for a `{type, state_key}` duo is easily retrievable, as well as the room's current state of the room, which is actually a JSON array contaning the latest events for all `{type, state_key}` duos. The Matrix APIs also allows one to easily retrieve the full state the room was at when a given timeline message was propagated through the room, and each state event refers to its parent.
81
+* State events, that contain an additional `state_key` property, and form the current state of the room. They can describe room creation (`m.room.create`), topic edition (`m.room.topic`), join rules (i.e. either invite-only or public, `m.room.join_rules`), membership update (i.e. join, leave, invite or ban, `m.room.member` with the Matrix ID of the user whose membership is being updated as the `state_key`). Just like timeline events, they're part of the room's timeline, but unlike them, the latest event for a `{type, state_key}` duo is easily retrievable, as well as the room's current state of the room, which is actually a JSON array contaning the latest events for all `{type, state_key}` duos. The Matrix APIs also allows one to easily retrieve the full state the room was at when a given timeline message was propagated through the room, and each state event refers to its parent.
82 82
 * Euphemeral events, which aren't included in the room's timeline, and are used to propagate information that doesn't last in time, such as typing notification ("[...] is typing...").
83 83
 
84 84
 Now, one of the things I really like about Matrix is that, besides the base event structure, you can technically put whatever you want into an event. There's no constraint on its class name (except it can't start with `m.`, which is a namespace reserved for events defined in the spec), nor on its content, so you're free to create your own events as you see fit, whether they are timeline events, state events or both (I'm not sure about euphemeral events, though). That's how you can create whole systems using only Matrix as the backend.