RGBFPPQLCKNAPYLXODVCVHTVUYBHRRXNOWZ3KNHJLU4H6G334M4QC
OZJTRMDC6FPDATKBDJXH25LBXTLDRNJXK2MOSXXSQB577MLJDOCAC
D745BHIMRZ4U6UASGNEPR6PAAWAGPMY5CH572UYVGAG6CH4FMURQC
S4P2B3FPF57HPHTIAYGMPCVKB7573IB5ZBKNXVBTB6ICCPF55WNQC
HKJBAU6VPDHOBRS6A7OJOI3FS4VVTRU4V6X2C46LXWAVVZBLYEQQC
EUK3YQ2J2W4MJERRB7HSM2ZWDKK7ADVCFTUMDBUC36QLVXHGQJNQC
K4DRWAY72CGDTYJ52KGZFEZDO5HHXOYRIYR5L2SHXXUF3BPNOWTAC
JFLKJBID7LCJ7KIIYBWTQZT3TO2WSZHRKRCZTHUXBMS5PTBRZYZAC
B5EQK6YSRS2YL3C4MXWCOUDYDEOB46LXAZNRCSXC7STIME7W6JQAC
GOQKAC5U66BDKPV2O7XALAHBW3UWJOM6SGOV3T4455NN52MJUSPAC
55NYCTVRAG7AFJJGNOKSB6NFFNWG5DOMCNZS2JM6EV6MUWCTD2JQC
RYCEPEGAAC37KBLMHK76U2SGKGXNHUZFN3QSHP4YYDU4453BRU6AC
4SCDF2TICD5R3HNKFJP5QVSFXST3TSW3THUSCDME5LYS44BH3ZKQC
3E5ILAY5YZ3TEHR7YCDEBOF376HHXUOPI5FTJQONAC7M5DUMWNJQC
MKNXKGN6V76WLGY3R2GO76DC47MUVP5AHEPWJB3X6SSCP4TR6WMAC
SX4IAP27IQ7B5QFX74GKQYRX4IJSJTZ4CLH7EPFSJWATV7LVXR4AC
FMITFZMDZ5E5DL7RX5KPFGWFQUUTEDHR36UYB6IVELFL6G7P2QYQC
}
}
pub fn (mut self Actor) joined_rooms_sync() {
if rooms := self.joined_rooms() {
println('joined_rooms_sync replace($rooms.len rooms)')
self.joined_rooms.replace(rooms)
} else {
panic('joined_rooms')
pub fn (mut self Actor) joined_rooms() ?[]&Room {
resp, _ := self.call_get('joined_rooms') or { return []&Room{} }
return resp['joined_rooms'].arr().map(&Room{ id: it.str() })
pub fn (mut self Actor) joined_rooms() ?[]string {
resp, _ := self.call_get('joined_rooms') ?
return resp['joined_rooms'].arr().map(it.str())
self.matrix.joined_rooms_sync()
joined_room_ids := self.matrix.joined_rooms() or {return}
mut matrix_rooms := []&matrix.Room{}
for jroom_id in joined_room_ids {
if mroom := self.matrix.joined_rooms.find_room_by_id(jroom_id) {
matrix_rooms << mroom
} else {
println("warning: room $jroom_id not found in db")
}
}
self.matrix.joined_rooms.replace(matrix_rooms)