Skip to content

Commit

Permalink
fix(notification): class cast exception would be thrown when sending …
Browse files Browse the repository at this point in the history
…to feishu or wecom (#3118)
  • Loading branch information
LuckyPickleZZ authored Aug 12, 2024
1 parent 898dca0 commit f9b9608
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ protected String getBody(Message message) {
}

@Override
protected MessageSendResult checkResponse(Message message, ResponseEntity response) {
Map<String, Object> body = (Map) response.getBody();
protected MessageSendResult checkResponse(Message message, ResponseEntity<String> response) {
Map<String, Object> body = JsonUtils.fromJsonMap(response.getBody(), String.class, Object.class);
if (Objects.isNull(body)) {
return MessageSendResult.ofFail("empty response from Feishu");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ protected String getBody(Message message) {
}

@Override
protected MessageSendResult checkResponse(Message message, ResponseEntity response) {
Map<String, Object> body = (Map) response.getBody();
protected MessageSendResult checkResponse(Message message, ResponseEntity<String> response) {
Map<String, Object> body = JsonUtils.fromJsonMap(response.getBody(), String.class, Object.class);
if (Objects.isNull(body)) {
return MessageSendResult.ofFail("empty response from WeCom");
}
Expand Down

0 comments on commit f9b9608

Please sign in to comment.