chore: remove quark dependency from delta 🎉

closes #283

fix: allow setting port and use_tls from config
closes #143
This commit is contained in:
Paul Makles
2024-04-07 23:41:31 +01:00
parent 6bc74749d2
commit 20d398d02c
32 changed files with 734 additions and 77 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@@ -59,6 +59,14 @@ impl revolt_rocket_okapi::response::OpenApiResponderInner for CachedFile {
pub async fn default_avatar(target: String) -> CachedFile {
CachedFile((
ContentType::PNG,
revolt_quark::util::pfp::avatar(target.chars().last().unwrap()),
match target.chars().last().unwrap() {
'0' | '1' | '2' | '3' | 'S' | 'Z' => include_bytes!("avatars/2.png").to_vec(),
'4' | '5' | '6' | '7' | 'T' => include_bytes!("avatars/3.png").to_vec(),
'8' | '9' | 'A' | 'B' => include_bytes!("avatars/4.png").to_vec(),
'C' | 'D' | 'E' | 'F' | 'V' => include_bytes!("avatars/5.png").to_vec(),
'G' | 'H' | 'J' | 'K' | 'W' => include_bytes!("avatars/6.png").to_vec(),
'M' | 'N' | 'P' | 'Q' | 'X' => include_bytes!("avatars/7.png").to_vec(),
_ => include_bytes!("avatars/1.png").to_vec(),
},
))
}