~vpzom/shoved-matrix

cb2091348f617c75967711681d09d584bb910425 — Colin Reeder 8 months ago ebaad5b
Avoid showing "null" notifications on read status change
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)"