User Tools

Site Tools


guides:matrix

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
guides:matrix [2020/07/13 17:57]
admin
guides:matrix [2020/07/13 18:16]
admin
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>​
guides/matrix.txt ยท Last modified: 2020/07/13 18:16 by admin