7 Jul 2024 |
emily | canonical space listing? | 11:02:55 |
Emma [it/its] | basically, each room in the space has a room -> space relation besides space -> room | 11:04:24 |
Emma [it/its] | what happened in the nixos room, and presumably also the case here, is that the room -> space relation (m.space.parent state event with space id) was never updated, so the room was still pointing to the old space
to fix it, you need to set "canonical" to false in the old event, and send a new event with "canonical" set to true | 11:06:02 |
emily | I see. sounds horrible. | 11:06:20 |
Emma [it/its] | tl;dr upgrading a space doesnt touch any events in the rooms in it | 11:07:21 |
emily | I don't think I understand why a room even needs a canonical space pointer. | 11:08:11 |
Emma [it/its] | allows discovery of the space just from the room | 11:09:05 |
hexa | In reply to @emma:rory.gay
what happened in the nixos room, and presumably also the case here, is that the room -> space relation (m.space.parent state event with space id) was never updated, so the room was still pointing to the old space
to fix it, you need to set "canonical" to false in the old event, and send a new event with "canonical" set to true manual state fuckery | 16:03:36 |
hexa | because /upgraderoom on the old space doesn't care | 16:03:48 |
hexa | I fault element for the broken workflow | 16:04:04 |
hexa | managing a large matrix space just isn't fun | 16:04:22 |
Emma [it/its] | element isnt involved in /upgraderoom btw | 16:19:17 |
Emma [it/its] | its actually synapse that's to blame here... | 16:20:27 |
Emma [it/its] | POST /_matrix/client/v3/rooms/{roomId}/upgrade
{
"new_version": "2"
}
| 16:21:05 |
Emma [it/its] | In reply to @hexa:lossy.network manual state fuckery do you want me to create a quick and dirty tool to automate the state fuckery? | 16:21:44 |
hexa | Feel free | 16:22:12 |
Emma [it/its] | alright, one moment please | 16:22:28 |
| Pyrox [Fox/It/She] joined the room. | 16:56:44 |
| Emma [it/its] ⚡️ joined the room. | 17:47:14 |
Emma [it/its] | hey hexa, which room id is the new space? | 17:57:30 |
Emma [it/its] | im getting very conflicting information from my server | 17:57:51 |
Emma [it/its] | !MKvhXlSTLGJUXpYuWF:nixos.org vs !brXHJeAtqliwNGqHQx:lossy.network (both of them showing up as NixOS with the blue logo on my end) | 17:59:42 |
dgrig | I get !brXHJeAtqliwNGqHQx:lossy.network from my HS for the new one | 17:59:53 |
Emma [it/its] | ah so the n.o one is the old one, got it | 18:00:09 |
Emma [it/its] | i dont exactly have a space to test on but i can check thhe basic logic | 18:01:41 |
Emma [it/its] | hm, kinda screwed by low moderating server count in the new space... | 18:07:40 |
Emma [it/its] | Download clipboard.png | 18:07:48 |
Emma [it/its] | alright, just taking top 10 servers in the space by member count, everything looks okay, time to build, publish and push to git :) | 18:14:02 |
Emma [it/its] | its kinda slow because i kept the code simple, but should get the job done
shoved as much as i could into the check phase, as i cant test the execution phase
execution phase workflow:
- iterate over children
- skip if no permission to send m.space.parent in room
- set canonical to false for all spaces that are set to canonical = true, if any
- send new m.space.parent with canonical = true
| 18:16:41 |
Emma [it/its] | alright, its done | 18:29:28 |