|
|
|
|
|
by Arathorn
2955 days ago
|
|
Sorry, my point was perhaps a bit mangled. If you want to send someone a message in Matrix it's indeed a trivial HTTP PUT; something like: curl -XPOST -d '{"msgtype":"m.text", "body":"hello"}' 'https://example.com/_matrix/client/api/r0/rooms/!CvcvRuDYDzT... However, what's happening under the hood is that you're not saying "Hi Bob, here's a message from Alice" - instead, you're saying "Hi everyone, I've added a message to the history of this room. Please can everyone sync their copy of the room with mine?". In other words, it's talking about the way the federation (server<->server) protocol is architected. There literally isn't a way in the federation protocol to say "please send a message from Alice to Bob"; instead the way you do it is to say "create a room and invite Bob to it (if you don't have one already); add a message to the room's history, and once the history has synchronised with Bob's server he'll have a copy of the message too". |
|