LQIELRM7CGBYTVA3GDZ54R3CAA64SVSJXNASQPOECWCGFEEUNS6AC
JFD7BGS3ANIPYT4DPN3TKDKGGKGTUHUU5LU35JRMV3KDTNHAEW5AC
F7UEAPOJLX43J32QD6JJ4YABOZLMQR2THHL6BGFTPSYZ35XQJSQAC
S4P2B3FPF57HPHTIAYGMPCVKB7573IB5ZBKNXVBTB6ICCPF55WNQC
QJQPPSN5XHBV7JCHNWSMSYAMI3SPA7AH6YBT6RZHM6VILD3EFBWAC
AM6J7DCX4WUM42ZO37VBOO7NX773WEPG7QYUUBSLSOUPEFXH4VOAC
ZMJSFPLI2KQY7HW3KODWOLXNX5SYZ6EELP2XTDVW4XGCZRHFEBJQC
5C6575AV4JOMVQL4N6W76DMERCIE6TYIEK4GUMFOPMNZKPESYDGAC
B5EQK6YSRS2YL3C4MXWCOUDYDEOB46LXAZNRCSXC7STIME7W6JQAC
K4DRWAY72CGDTYJ52KGZFEZDO5HHXOYRIYR5L2SHXXUF3BPNOWTAC
if alias_result := self.matrix.room_alias(room) {
match alias_result {
matrix.RoomAliasResultRoom {
match self.join_request_matrix(room, alias_result.room_id) {
.saved {
msg = 'matrix room $room ($alias_result.room_id) added'
go self.sync_rooms()
}
.already_joined {
msg = 'matrix room $room already added'
}
}
if alias_room := self.matrix.room_alias(room) {
match self.join_request_matrix(room, alias_room.id) {
.saved {
msg = 'matrix room $room ($alias_room.id) added'
go self.sync_rooms()
if alias_result := self.matrix.room_alias(room) {
match alias_result {
matrix.RoomAliasResultRoom {
self.leave_request(chat.System.matrix, network, alias_result.room_id)
msg = 'matrix room $room removed'
}
if alias_room := self.matrix.room_alias(room) {
self.leave_request(chat.System.matrix, network, alias_room.id)
msg = 'matrix room $alias_room removed'
} else {
match err {
matrix.RoomAliasErrNotFound {}
if alias_result := self.matrix.room_alias(room.id) {
match alias_result {
matrix.RoomAliasResultRoom {
println('sync_rooms: joining $alias_result.room_id')
_, code := self.matrix.join(alias_result.room_id) or {
println('matrix.join fail $err')
continue
}
if code == 200 {
self.matrix.joined_rooms.add(room)
self.admin_say('matrix: room $room joined')
} else if code == 403 {
println('sync_rooms: not invited to $room.name')
}
}
matrix.RoomAliasResultNotFound {
if alias_room := self.matrix.room_alias(room.id) {
println('sync_rooms: joining $alias_room.id')
_, code := self.matrix.join(alias_room.id) or {
println('matrix.join fail $err')
continue
}
if code == 200 {
self.matrix.joined_rooms.add(room)
self.admin_say('matrix: room $room joined')
} else if code == 403 {
println('sync_rooms: not invited to $room.name')
}
} else {
match err {
matrix.RoomAliasErrNotFound {