Replace profile_* with userid_*
Add a missing dot in the errormessage Require mxc:// to be present at the start of an avatar_url Update mxc check TODO Show displayname or avatar_url if either is available when getting the profile Endpoint Return the correct data in case of a empty displayname or an empty avatar_url Took 50 minutes Took 34 seconds
This commit is contained in:
parent
062c5521f0
commit
b1284fd509
3 changed files with 91 additions and 52 deletions
|
@ -52,8 +52,8 @@ impl MultiValue {
|
|||
pub struct Database {
|
||||
pub userid_password: sled::Tree,
|
||||
pub userid_deviceids: MultiValue,
|
||||
pub profile_displayname: sled::Tree,
|
||||
pub profile_avatar_url: sled::Tree,
|
||||
pub userid_displayname: sled::Tree,
|
||||
pub userid_avatar_url: sled::Tree,
|
||||
pub deviceid_token: sled::Tree,
|
||||
pub token_userid: sled::Tree,
|
||||
pub pduid_pdus: sled::Tree,
|
||||
|
@ -77,8 +77,8 @@ impl Database {
|
|||
Self {
|
||||
userid_password: db.open_tree("userid_password").unwrap(),
|
||||
userid_deviceids: MultiValue(db.open_tree("userid_deviceids").unwrap()),
|
||||
profile_displayname: db.open_tree("profile_displayname").unwrap(),
|
||||
profile_avatar_url: db.open_tree("profile_avatar_url").unwrap(),
|
||||
userid_displayname: db.open_tree("userid_displayname").unwrap(),
|
||||
userid_avatar_url: db.open_tree("userid_avatar_url").unwrap(),
|
||||
deviceid_token: db.open_tree("deviceid_token").unwrap(),
|
||||
token_userid: db.open_tree("token_userid").unwrap(),
|
||||
pduid_pdus: db.open_tree("pduid_pdus").unwrap(),
|
||||
|
@ -108,7 +108,7 @@ impl Database {
|
|||
);
|
||||
}
|
||||
println!("# AccountData -> Displayname:");
|
||||
for (k, v) in self.profile_displayname.iter().map(|r| r.unwrap()) {
|
||||
for (k, v) in self.userid_displayname.iter().map(|r| r.unwrap()) {
|
||||
println!(
|
||||
"{:?} -> {:?}",
|
||||
String::from_utf8_lossy(&k),
|
||||
|
@ -116,7 +116,7 @@ impl Database {
|
|||
);
|
||||
}
|
||||
println!("# AccountData -> AvatarURL:");
|
||||
for (k, v) in self.profile_avatar_url.iter().map(|r| r.unwrap()) {
|
||||
for (k, v) in self.userid_avatar_url.iter().map(|r| r.unwrap()) {
|
||||
println!(
|
||||
"{:?} -> {:?}",
|
||||
String::from_utf8_lossy(&k),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue