Skip to content

Commit

Permalink
Fix error when checking for deletion/deactivation
Browse files Browse the repository at this point in the history
polypixeldev committed Sep 23, 2024
1 parent 7fe41ef commit 65d61ea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/com/hackclub/hccore/slack/SlackBot.java
Original file line number Diff line number Diff line change
@@ -465,8 +465,13 @@ public boolean isDeactivated(String id) {

try {
var res = client.usersInfo(r -> r.token(getBotToken()).user(id));
var user = res.getUser();

return res.getUser().isDeleted();
if (user == null) {
return true;
} else {
return user.isDeleted();
}
} catch (SlackApiException e) {
return true;
} catch (IOException e) {

0 comments on commit 65d61ea

Please sign in to comment.