Skip to content

Commit

Permalink
Update chat_is_unavailable, cover the new errors
Browse files Browse the repository at this point in the history
  • Loading branch information
iovxw committed Apr 19, 2020
1 parent 53d4e76 commit a9c045e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ async fn push_updates<I: IntoIterator<Item = i64>>(
}

pub fn chat_is_unavailable(s: &str) -> bool {
s.contains("Forbidden") || s.contains("chat not found")
s.contains("Forbidden")
|| s.contains("chat not found")
|| s.contains("have no rights")
|| s.contains("need administrator rights")
}

#[derive(Default)]
Expand Down

0 comments on commit a9c045e

Please sign in to comment.