O774NWA2NLE34RNFCQAYXU2QVRVTPVW6O7KWXOUTCS35CX4EY4HQC
ZJXMKLGPT3GPDL4FJ4TKWUHZR35UVG3QDNTW4K4WP4BMGJ76C23AC
ENRR7LLIYI4SGOFMKYHLYCQEQOZVYUKCSHPXBOBN23QIPE6CPLSAC
U2PKVLFH26Z2FCROEOLMAMYGB3NFVFBQPMJQ46IYO5NRHCOJOLHQC
S4P2B3FPF57HPHTIAYGMPCVKB7573IB5ZBKNXVBTB6ICCPF55WNQC
K4DRWAY72CGDTYJ52KGZFEZDO5HHXOYRIYR5L2SHXXUF3BPNOWTAC
D5WIJLNIFO5S66YXYKAHSU2VZJ6SJ7BVAUHDJMGX4ABVRGJYHZYAC
VZTRURPSFBBVY6ST7SPTUT5ITCKYLVQHUTALVFUBMC4HEECXKKQQC
QL6XMZVF4SF7IRDMR2EYCPVTBMO6XMNE3RHFKFFD7HYFVLZNPT5QC
WCWRJA7JFVRAEA6WSABCMXLASKUAZ6JXPZPVX5B56Z6G7SKOJGNQC
HLN3DMBIZROGLJG2LVA3XTA4WXYE3FICJX5XOCEE3LEGA5SSULWQC
EZPESIUHAETBQPEZ2CM7L6DBOWUDDTB7NFIESHJ5P4LI7NJB4WIQC
HIRCSAI6D4EEV57CQCFIOCHXT4FUSABC4J46ER2GQY7IED3P6ZRQC
4ZIQ4TM73PUX5BEMYHIWRWEKDTBWX3YM5MI7BZHDCFSSSHILGZNAC
SUH4BQLPGHDR2W2VCWZOXG2CU3RRFBMWAH4EQIFKO4SB4YRNJRRQC
MGLPPSPTZYTHV2IW522JPA7MXU56AGFATN7O64GT3VHUIQ6H6W2QC
pub fn (mut self Actor) partial_name_to_name(room_id string) string {
mut matrix_name := ''
if matrix_name_yes := self.joined_rooms.room_name_by_partial_name(room_id) {
matrix_name = matrix_name_yes
} else {
matrix_name = 'idtonamefail'
}
println('matrix alias found: $matrix_name')
return matrix_name
}
pub fn (mut self Rooms) room_name_by_partial_name(room_name string) ?string {
println('room_name_by_partial_name: searching $room_name in $self.rooms.len rooms')
for mut room in self.rooms {
partial_name := room.name.before(':')
println('room_name comparing $partial_name to $room_name')
if partial_name == room_name {
return room.name
}
}
return error('room_partial_name not in room list')
}
// VBUG fn ?string in match {} is fail
// mut matrix_room_id := self.matrix.room_alias(room_name) or { 'unknown' }
// println('room_match matrix lookup $matrix_room_id')
mut matrix_name := ''
if matrix_name_yes := self.matrix.joined_rooms.room_name_by_id(room_name) {
matrix_name = matrix_name_yes
} else {
matrix_name = 'unknown'
}
println('room_match matrix found $matrix_name')
// VBUG `match` expression branch has unsupported statement (`v.ast.IfExpr`)
// when this block is inside .matrix {}
fn (mut self Main) safe_name(name string) string {
fn (mut self Main) matching_matrix_channel(room_name string) string {
mut matrix_room := ''
if mroom := self.matrix.room_by_partial_name(room_name) {
matrix_room = mroom.name
} else {
matrix_room = 'matchingmatrixchannelfail'
}
return matrix_room
}
fn (mut self Main) matching_irc_channel(room_name string) string {