Why Nostr? What is Njump?
2024-11-17 06:55:31

Sofia on Nostr: i wish a matrix client other than nheko supported the mutual rooms MSC lol, synapse ...

i wish a matrix client other than nheko supported the mutual rooms MSC lol, synapse (the most popular server implementation) supports it so if more clients did most people could use it even though it's technically not standard yet

my client definitely will, but until then i just use a tiny script that calls the endpoints directly lol, here it is if anyone is interested (it's a one liner)

{ for room in $(curl --get -H 'Authorization: Bearer token-goes-here' --data-urlencode "user_id=$1" https://example.com/_matrix/client/unstable/uk.half-shot.msc2666/user/mutual_rooms | jq -r '.joined[]'); do curl -H 'Authorization: Bearer token-goes-here' "https://example.com/_matrix/client/v3/rooms/$room/state/m.room.name"; | jq -r .name; done; } 2>/dev/null

some info:
rooms without a name, which mainly means dms, will output null (which is fine since you can just assume it's a dm)

the other user's id is the only parameter

instead of example.com you should use the domain your server's API uses (which is *not* necessarily the same as its canonical domain), for example matrix.org's is matrix-client.matrix.org

replace token-goes-here with your actual access token (obviously)

jq and curl are required
Author Public Key
npub1mg6epkkhjnxql6v3ss4z3zfqyj2kvchpqjdg6r5lqpzumy90mu5qe3ag5l