This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
guides:matrix [2020/07/13 17:51] admin |
guides:matrix [2020/07/13 18:16] (current) admin |
||
---|---|---|---|
Line 12: | Line 12: | ||
* Click on the three dots at the edge of a room name and click ''Settings'' | * Click on the three dots at the edge of a room name and click ''Settings'' | ||
* Choose ''Advanced'' to see the ''Internal Room ID'' | * Choose ''Advanced'' to see the ''Internal Room ID'' | ||
- | * #glasgow on the server is ''!BOrDFgeDdZZbUvfjjs:glasgow.social'' | + | * #opensource on the server is ''!uVhYeryxRiaOwTlATT:glasgow.social'' |
===== Posting messages to a room ===== | ===== Posting messages to a room ===== | ||
Line 57: | Line 57: | ||
===== Listening to rooms ===== | ===== Listening to rooms ===== | ||
This is pretty straightforward. This is just how to see messages that are posted, but if you explore what is returned then you can see all sorts of things too (like joins, images, likes, invites etc). I run something like this on a terminal so I can see what's going on in all my rooms at a glance. Very cool. | This is pretty straightforward. This is just how to see messages that are posted, but if you explore what is returned then you can see all sorts of things too (like joins, images, likes, invites etc). I run something like this on a terminal so I can see what's going on in all my rooms at a glance. Very cool. | ||
+ | |||
+ | <code bash get_messages.sh> | ||
+ | #!/bin/bash | ||
+ | # Usage: | ||
+ | # ./get_messages.sh | ||
+ | msgtype=m.text | ||
+ | homeserver=glasgow.social | ||
+ | room=room_id_here | ||
+ | access_token=your_access_token_here | ||
+ | from=start_point_goes_here | ||
+ | |||
+ | curl -XGET "https://$homeserver/_matrix/client/r0/rooms/$room/messages?access_token=$access_token&from=$from" | ||
+ | </code> | ||
<code php ListenToMatrix.php> | <code php ListenToMatrix.php> |