P5UC3WC22YVZLV3A2PPZ54MZABW66GHGMH7RCVTK5HDTG6FWFZUQC
6X33AHGPVP35T5LN6D6Q55LRVRIBGVCI3INVWFCFJ62DVK6YNMRAC
3CWGLJPBNZCCMZELC64VKGORTTDU5RY2ABF6DKRWS5FURPIG5PWQC
52V3VDLQROV2ZXTH3G4A2RPHF26QLZQ2TNUWLYMZRELTWG75QIIQC
S4P2B3FPF57HPHTIAYGMPCVKB7573IB5ZBKNXVBTB6ICCPF55WNQC
AETEUT6ER7MJXNYTBH5RHUT5URSRWNBJPXU2CA4URLSNAZYMWPIAC
7755FHS7ZTG4YGJNFYAONWSWSM636WOWFRISDKQU2AOJHN6ZVMBAC
X6OO4RRZO4VNXDK3YDFUNKMJLRUTMR7TYTLJUVKC6RDY3VU67PAQC
K7K3EWO4H75J63G3IREKSPGBVBF6LFZHD4WRKGQTWUYTYGHWQ22QC
mut alias := ''
for s in data['invite_room_state'].arr() {
state := s.as_map()
if state['type'].str() == 'm.room.canonical_alias' {
alias = state['content'].as_map()['alias'].str()
}
if state['type'].str() == 'm.room.member' {
if alias.len == 0 {
alias = state['content'].as_map()['sender'].str()
}
}
}
return alias
mut alias := ''
for s in data['invite_room_state'].arr() {
state := s.as_map()
mtype := state['type'].str()
println("invite_by checking type $mtype in $state")
if mtype == 'm.room.canonical_alias' {
alias = state['content'].as_map()['alias'].str()
}
if mtype == 'm.room.member' {
if alias.len == 0 {
alias = state['content'].as_map()['sender'].str()
}
}
}
if alias.len == 0 {
println('invite_by: warning no inviter found')
}
return alias