1 files changed, 7 insertions(+), 0 deletions(-)
M handle.sh
M handle.sh => handle.sh +7 -0
@@ 5,6 5,13 @@ echo "$body"
room_id="$(echo "$body" | jq -r .room_id)"
event_id="$(echo "$body" | jq -r .event_id)"
+
+if [ "$event_id" = "null" ]; then
+ # used to signal that a notification has been read
+ # TODO maybe clear old notifications in that case?
+ exit 0
+fi
+
homeserver_url="$(jq -r .homeserver_url < ~/.config/shoved-matrix/auth.json)"
token="$(jq -r .token < ~/.config/shoved-matrix/auth.json)"