MVK22OUT7KFI6GDLRUFRDVAQA6XK5KYPK2MCOAUIJY5IXOU2ESUQC
RHY7M7H4XYDAYJYUM4ERWBRXM4O6Y6EXCEDALLHM57UAM7HRO6HQC
HITACCJTFRHFKDQFWBJCQEQFLC6KJBQGV7T4DWV2GTLWWZINGUBQC
YLDLW26BHU33CBASODRBNFPRTUMCOGUFFI5CXGEIEL2EL3DFEPQQC
XW6WGRDUNNNGXCI5T2ZA6K27S7URB36ZIYZNEXWJTUPO4YGL3RWQC
S4P2B3FPF57HPHTIAYGMPCVKB7573IB5ZBKNXVBTB6ICCPF55WNQC
GBRBUAPMIY5CR3ZDN6TH7O2N4TRIOK6IKBFKX45RHFSKBHZGWVLQC
F7UEAPOJLX43J32QD6JJ4YABOZLMQR2THHL6BGFTPSYZ35XQJSQAC
LQIELRM7CGBYTVA3GDZ54R3CAA64SVSJXNASQPOECWCGFEEUNS6AC
JHXNF5UYYTCR36BEJRW764MYM5WS7MMH2NPCCFJMNXNYDJHVYNQQC
EY6EWMGOLK3IJYPINGJN7HBRXN4S76RN3KNUKKXLZLRJTOXBZPDAC
7CFD3UOWFKMZRCBYEIU2NWGSPS2EXK5AP4QZFMKUH3K3JCBOEKXAC
escaped_user_id := urllib.path_escape(user_id)
mut name_data := map[string]json2.Any{}
name_data['displayname'] = user.name
_, _ := self.call(http.Method.put, 'profile/$escaped_user_id/displayname?user_id=$escaped_user_id',
name_data.str()) ?
self.user_displayname(user_id, user.name) or { println('ERR: $err') }
pub fn (mut self Actor) user_display_name(user_id string) ?string {
escaped_user_id := urllib.path_escape(user_id)
url := 'profile/$escaped_user_id/displayname?user_id=$escaped_user_id'
params, _:= self.call_get(url) ?
println("user_display_name $params")
return ''
}
pub fn (mut self Actor) user_displayname(user_id string, displayname string) ?string {
mut name_data := map[string]json2.Any{}
escaped_user_id := urllib.path_escape(user_id)
url := 'profile/$escaped_user_id/displayname?user_id=$escaped_user_id'
name_data['displayname'] = displayname
_, _ := self.call(http.Method.put, url,name_data.str()) ?
return ''
}
matrix_user := matrix.split(name)[1]
irc_name := regex_self_replace(self.config.irc_regex, matrix_user)
// check matrix registration
display_name := self.matrix.user_display_name(name) or {
matrix_user := matrix.split(name)[1]
irc_nick := regex_self_replace(self.config.irc_regex, matrix_user)
self.matrix.user_displayname(name, irc_nick) or {println(err)}
irc_nick
}