mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-27 06:04:54 +00:00
[AB-254] fixing exception for unSuggest in case the suggestion message has been deleted
This commit is contained in:
@@ -239,7 +239,12 @@ public class SuggestionServiceBean implements SuggestionService {
|
||||
throw new UnSuggestNotPossibleException();
|
||||
}
|
||||
return messageService.deleteMessageInChannelInServer(suggestion.getServer().getId(), suggestion.getChannel().getId(), suggestion.getMessageId())
|
||||
.thenAccept(unused -> self.deleteSuggestion(suggestionId, serverId));
|
||||
.thenAccept(unused -> self.deleteSuggestion(suggestionId, serverId))
|
||||
.exceptionally(throwable -> {
|
||||
log.info("Suggestion message for suggestion {} in server {} did not exist anymore - ignoring.", suggestionId, serverId);
|
||||
self.deleteSuggestion(suggestionId, serverId);
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user