add: mail base
This commit is contained in:
parent
a337e0c7c1
commit
29155ddb0c
11 changed files with 211 additions and 3 deletions
|
@ -100,14 +100,29 @@ impl DataManager {
|
|||
tokens: serde_json::from_str(&get!(x->6(String)).to_string()).unwrap(),
|
||||
permissions: FinePermission::from_bits(get!(x->7(i32)) as u32).unwrap(),
|
||||
is_verified: get!(x->8(i32)) as i8 == 1,
|
||||
notification_count: get!(x->9(i32)) as usize,
|
||||
notification_count: {
|
||||
let x = get!(x->9(i32));
|
||||
if x > (usize::MAX - 1000) as i32 {
|
||||
// we're a little too close to the maximum count, clearly something's gone wrong
|
||||
0
|
||||
} else {
|
||||
x as usize
|
||||
}
|
||||
},
|
||||
follower_count: get!(x->10(i32)) as usize,
|
||||
following_count: get!(x->11(i32)) as usize,
|
||||
last_seen: get!(x->12(i64)) as usize,
|
||||
totp: get!(x->13(String)),
|
||||
recovery_codes: serde_json::from_str(&get!(x->14(String)).to_string()).unwrap(),
|
||||
post_count: get!(x->15(i32)) as usize,
|
||||
request_count: get!(x->16(i32)) as usize,
|
||||
request_count: {
|
||||
let x = get!(x->16(i32));
|
||||
if x > (usize::MAX - 1000) as i32 {
|
||||
0
|
||||
} else {
|
||||
x as usize
|
||||
}
|
||||
},
|
||||
connections: serde_json::from_str(&get!(x->17(String)).to_string()).unwrap(),
|
||||
stripe_id: get!(x->18(String)),
|
||||
grants: serde_json::from_str(&get!(x->19(String)).to_string()).unwrap(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue