Fix two subscription bugs
This commit is contained in:
@ -103,7 +103,7 @@ fn set_cookies_method(req: Request<Body>, remove_cookies: bool) -> Response<Body
|
||||
|
||||
let mut res = redirect(path);
|
||||
|
||||
for &name in &PREFS {
|
||||
for name in [PREFS.to_vec(), vec!["subscriptions"]].concat() {
|
||||
match form.get(name) {
|
||||
Some(value) => res.insert_cookie(
|
||||
Cookie::build(name.to_owned(), value.to_owned())
|
||||
|
@ -199,7 +199,7 @@ pub async fn subscriptions(req: Request<Body>) -> Result<Response<Body>, String>
|
||||
sub_list.sort_by_key(|a| a.to_lowercase())
|
||||
} else if action.contains(&"unsubscribe".to_string()) {
|
||||
// Remove sub name from subscribed list
|
||||
sub_list.retain(|s| s != part);
|
||||
sub_list.retain(|s| s.to_lowercase() != part.to_lowercase());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user