Skip to content

Instantly share code, notes, and snippets.

@ara4n
Created March 18, 2020 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ara4n/a3e0bfbf9be086bb57b22202a4d01851 to your computer and use it in GitHub Desktop.
Save ara4n/a3e0bfbf9be086bb57b22202a4d01851 to your computer and use it in GitHub Desktop.
Print all timestamps of messages in a room
t='t9688-1300128700_757269739_329105_458837962_294315883_1132696_45078565_22513400_82822'
while true
do curl -s 'https://matrix-client.matrix.org/_matrix/client/r0/rooms/!pcfWjiETvnVuspPLPl:mozilla.org/messages?from='$t'&limit=20&dir=b&filter=%7B%22lazy_load_members%22%3Atrue%7D' -H "authorization: Bearer $at" > msg.json >> msgs.json
cat msg.json | jq '.chunk[].origin_server_ts'
t=`cat msg.json | jq -r '.end'`
sleep 0.5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment