Remove port number from room IDs in pasted examples

This commit is contained in:
Paul "LeoNerd" Evans 2016-04-25 13:55:57 +01:00
parent b448c96096
commit 8824fe8391

View file

@ -101,7 +101,7 @@ create a room::
{ {
"room_alias": "#tutorial:localhost", "room_alias": "#tutorial:localhost",
"room_id": "!asfLdzLnOdGRkdPZWu:localhost:8080" "room_id": "!asfLdzLnOdGRkdPZWu:localhost"
} }
The "room alias" is a human-readable string which can be shared with other users The "room alias" is a human-readable string which can be shared with other users
@ -116,7 +116,7 @@ Sending messages
---------------- ----------------
You can now send messages to this room:: You can now send messages to this room::
curl -XPOST -d '{"msgtype":"m.text", "body":"hello"}' "https://localhost:8448/_matrix/client/r0/rooms/%21asfLdzLnOdGRkdPZWu:localhost:8080/send/m.room.message?access_token=YOUR_ACCESS_TOKEN" curl -XPOST -d '{"msgtype":"m.text", "body":"hello"}' "https://localhost:8448/_matrix/client/r0/rooms/%21asfLdzLnOdGRkdPZWu:localhost/send/m.room.message?access_token=YOUR_ACCESS_TOKEN"
{ {
"event_id": "YUwRidLecu" "event_id": "YUwRidLecu"
@ -147,7 +147,7 @@ Inviting a user to a room
------------------------- -------------------------
You can directly invite a user to a room like so:: You can directly invite a user to a room like so::
curl -XPOST -d '{"user_id":"@myfriend:localhost"}' "https://localhost:8448/_matrix/client/r0/rooms/%21asfLdzLnOdGRkdPZWu:localhost:8080/invite?access_token=YOUR_ACCESS_TOKEN" curl -XPOST -d '{"user_id":"@myfriend:localhost"}' "https://localhost:8448/_matrix/client/r0/rooms/%21asfLdzLnOdGRkdPZWu:localhost/invite?access_token=YOUR_ACCESS_TOKEN"
This informs ``@myfriend:localhost`` of the room ID This informs ``@myfriend:localhost`` of the room ID
``!CvcvRuDYDzTOzfKKgh:localhost`` and allows them to join the room. ``!CvcvRuDYDzTOzfKKgh:localhost`` and allows them to join the room.
@ -156,7 +156,7 @@ Joining a room via an invite
---------------------------- ----------------------------
If you receive an invite, you can join the room:: If you receive an invite, you can join the room::
curl -XPOST -d '{}' "https://localhost:8448/_matrix/client/r0/rooms/%21asfLdzLnOdGRkdPZWu:localhost:8080/join?access_token=YOUR_ACCESS_TOKEN" curl -XPOST -d '{}' "https://localhost:8448/_matrix/client/r0/rooms/%21asfLdzLnOdGRkdPZWu:localhost/join?access_token=YOUR_ACCESS_TOKEN"
NB: Only the person invited (``@myfriend:localhost``) can change the membership NB: Only the person invited (``@myfriend:localhost``) can change the membership
state to ``"join"``. Repeatedly joining a room does nothing. state to ``"join"``. Repeatedly joining a room does nothing.
@ -166,7 +166,7 @@ Joining a room via an alias
Alternatively, if you know the room alias for this room and the room config Alternatively, if you know the room alias for this room and the room config
allows it, you can directly join a room via the alias:: allows it, you can directly join a room via the alias::
curl -XPOST -d '{}' "https://localhost:8448/_matrix/client/r0/join/%21asfLdzLnOdGRkdPZWu:localhost:8080?access_token=YOUR_ACCESS_TOKEN" curl -XPOST -d '{}' "https://localhost:8448/_matrix/client/r0/join/%21asfLdzLnOdGRkdPZWu:localhost?access_token=YOUR_ACCESS_TOKEN"
{ {
"room_id": "!CvcvRuDYDzTOzfKKgh:localhost" "room_id": "!CvcvRuDYDzTOzfKKgh:localhost"
@ -214,7 +214,7 @@ invited/joined on, they can get all the user's state for all rooms::
"last_active_ago": 19, "last_active_ago": 19,
"presence": "online" "presence": "online"
}, },
"sender": "@example:localhost:8080", "sender": "@example:localhost",
"type": "m.presence" "type": "m.presence"
} }
] ]
@ -222,7 +222,7 @@ invited/joined on, they can get all the user's state for all rooms::
"rooms": { "rooms": {
"invite": {}, "invite": {},
"join": { "join": {
"!asfLdzLnOdGRkdPZWu:localhost:8080": { "!asfLdzLnOdGRkdPZWu:localhost": {
"account_data": { "account_data": {
"events": [] "events": []
}, },
@ -236,11 +236,11 @@ invited/joined on, they can get all the user's state for all rooms::
"events": [ "events": [
{ {
"content": { "content": {
"creator": "@example:localhost:8080" "creator": "@example:localhost"
}, },
"event_id": "$14606534990LhqHt:localhost:8080", "event_id": "$14606534990LhqHt:localhost",
"origin_server_ts": 1460653499699, "origin_server_ts": 1460653499699,
"sender": "@example:localhost:8080", "sender": "@example:localhost",
"state_key": "", "state_key": "",
"type": "m.room.create", "type": "m.room.create",
"unsigned": { "unsigned": {
@ -253,11 +253,11 @@ invited/joined on, they can get all the user's state for all rooms::
"displayname": null, "displayname": null,
"membership": "join" "membership": "join"
}, },
"event_id": "$14606534991nsZKk:localhost:8080", "event_id": "$14606534991nsZKk:localhost",
"membership": "join", "membership": "join",
"origin_server_ts": 1460653499727, "origin_server_ts": 1460653499727,
"sender": "@example:localhost:8080", "sender": "@example:localhost",
"state_key": "@example:localhost:8080", "state_key": "@example:localhost",
"type": "m.room.member", "type": "m.room.member",
"unsigned": { "unsigned": {
"age": 239164 "age": 239164
@ -287,7 +287,7 @@ applying a filter that asks for a limit of 1 timeline event per room::
"rooms": { "rooms": {
"invite": {}, "invite": {},
"join": { "join": {
"!asfLdzLnOdGRkdPZWu:localhost:8080": { "!asfLdzLnOdGRkdPZWu:localhost": {
... ...
"timeline": { "timeline": {
"events": [ "events": [
@ -296,9 +296,9 @@ applying a filter that asks for a limit of 1 timeline event per room::
"body": "hello", "body": "hello",
"msgtype": "m.text" "msgtype": "m.text"
}, },
"event_id": "$14606535757KCGXo:localhost:8080", "event_id": "$14606535757KCGXo:localhost",
"origin_server_ts": 1460653575105, "origin_server_ts": 1460653575105,
"sender": "@example:localhost:8080", "sender": "@example:localhost",
"type": "m.room.message", "type": "m.room.message",
"unsigned": { "unsigned": {
"age": 800348 "age": 800348
@ -340,7 +340,7 @@ To use this token, specify its value as the ``since`` parameter to another
"last_active_ago": 12, "last_active_ago": 12,
"presence": "online" "presence": "online"
}, },
"sender": "@example:localhost:8080", "sender": "@example:localhost",
"type": "m.presence" "type": "m.presence"
} }
] ]