52V3VDLQROV2ZXTH3G4A2RPHF26QLZQ2TNUWLYMZRELTWG75QIIQC
P55KFFWQA4XHWREYQ7OTR2EP2SFWHORAT4YKH22OZMYVNZUZQC6AC
HTHDQRSJV4WVGIM53GR7JGIRZACMIZDI5UMJ522QFI3ZCX5K56GQC
AETEUT6ER7MJXNYTBH5RHUT5URSRWNBJPXU2CA4URLSNAZYMWPIAC
S4P2B3FPF57HPHTIAYGMPCVKB7573IB5ZBKNXVBTB6ICCPF55WNQC
NLJ46AR34RLPF6A5XTBTQU72LDYPCZONUVXFI4ZYFTWI2JVJJDNAC
DUVDPDDKESNM6URN3ZSOOVVGBUW5MTGHXXSKXHSMO3EG4ZXOP3HQC
EUKQXK634GO43Z44CEPV3VJIOF7KOCPSM4G5ZHUQEJFGIFJ475XAC
ZMJSFPLI2KQY7HW3KODWOLXNX5SYZ6EELP2XTDVW4XGCZRHFEBJQC
SX4IAP27IQ7B5QFX74GKQYRX4IJSJTZ4CLH7EPFSJWATV7LVXR4AC
7MLJEICDGSP5GMTO7MRQY5SFBLEROD6LDGKBTGHSIHJVB42ZXVMAC
}
pub fn (self Actor) invite_by(data map[string]json2.Any) string {
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
room := cmd.data['room_id'].str()
println('m.room.member user ${cmd.data['state_key']} room $room is ${c['membership']}')
room_id := cmd.data['room_id'].str()
println('m.room.member user ${cmd.data['state_key']} room_id $room_id is ${c['membership']}')