Implement message types and lobby join

This commit is contained in:
bel
2020-05-03 08:14:29 -06:00
parent dec077debb
commit f24cc62118
9 changed files with 270 additions and 7 deletions

View File

@@ -82,10 +82,12 @@ out="$(
-H 'content-type: application/json' \
-H 'Authorization: Bearer '"$access_token" \
| jq '{"timeline": .rooms.join[].timeline.events[], "next": .next_batch}' \
| jq '{"content": .timeline.content.body, "sender": .timeline.sender, "next": .next}'
| jq '{"content": .timeline.content, "sender": .timeline.sender, "next": .next}' \
)"
printf "%s\n" "$out"
since="$(echo "$out" | jq -r .next | tail -n 1)"
printf "%s\n" "$out" | jq .
since="$(
echo "$out" \
| jq -r .next | tail -n 1)"
# send new message
txid="$(cat /proc/sys/kernel/random/uuid)"
@@ -112,5 +114,6 @@ curl -sS "http://localhost:39487/_matrix/client/r0/sync?since=$since" \
-H 'content-type: application/json' \
-H 'Authorization: Bearer '"$access_token" \
| jq '{"timeline": .rooms.join[].timeline.events[], "next": .next_batch}' \
| jq '{"content": .timeline.content.body, "sender": .timeline.sender, "next": .next}'
| jq '{"content": .timeline.content, "sender": .timeline.sender, "next": .next}' \
| jq .