Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add Report to Discord Channel #393

Merged
merged 14 commits into from
Nov 14, 2023
Merged

Conversation

yunyoung1819
Copy link
Collaborator

@yunyoung1819 yunyoung1819 added the ✨feature New feature or request label Oct 29, 2023
@yunyoung1819 yunyoung1819 self-assigned this Oct 29, 2023
@yunyoung1819 yunyoung1819 added the 😺 API Server Api Domain label Oct 29, 2023
Copy link
Collaborator

@seonghun-dev seonghun-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

추가 테스트 코드에서 외부 API 테스트 할때 MockServer를 활용해보는 것도 좋을 것 같습니다.

@RequiredArgsConstructor
public class DiscordService {

public void sendMessages(String webhookUrl, String content, String discordReportingChannel) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

webhookUrl 부분은 설정으로 빼도 좋을 것 같습니다

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

음 혹시 설정으로 빼는 것이 프로퍼티로 뺴는거 인걸까요~?
아이템 신고하기와 사용자 차단이 webhook url 이 달라서 DiscordService에서 채널에 따라 url을 분기시키기보다 각각의 Report 서비스에서 webhookUrl을 프로퍼티에서 읽어와 DiscordService로 전달하도록 구현했습니당!
DiscordService에서 설정으로 빼면 채널별로 url 분기가 필요하지 않나여~?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

채널별로 url이 달라지는 군요
그럼 String discordReportingChannel 이 부분이 필요없어지겠군요


import com.depromeet.report.block.dto.UserBlockReportDto;

public interface UserBlockReportService {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

상위에서 인터페이스 사용이 안되는 것 같습니다

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DiscordUserBlockReportService implements UserBlockReportService로 사용하고 있는데 혹시 상위에서 인터페이스 사용이 안된다는건 어떤 부분 말씀이실까여~?

@codecov-commenter
Copy link

codecov-commenter commented Nov 5, 2023

Codecov Report

Merging #393 (c047329) into dev (5c03892) will increase coverage by 0.51%.
Report is 3 commits behind head on dev.
The diff coverage is 40.81%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                dev     #393      +/-   ##
============================================
+ Coverage     28.84%   29.36%   +0.51%     
- Complexity       87       91       +4     
============================================
  Files            52       57       +5     
  Lines           676      722      +46     
  Branches         21       22       +1     
============================================
+ Hits            195      212      +17     
- Misses          479      508      +29     
  Partials          2        2              
Files Coverage Δ
...mmon/annotation/validator/BannedWordValidator.java 100.00% <100.00%> (ø)
...java/com/depromeet/common/error/dto/ErrorCode.java 100.00% <100.00%> (ø)
...promeet/domains/item/service/ItemClaimService.java 100.00% <100.00%> (ø)
...promeet/domains/user/service/UserBlockService.java 100.00% <100.00%> (ø)
...ort/claim/service/SlackItemClaimReportService.java 0.00% <ø> (ø)
...romeet/external/discord/DiscordWebhookPayload.java 0.00% <0.00%> (ø)
...t/block/service/DiscordUserBlockReportService.java 0.00% <0.00%> (ø)
...com/depromeet/external/discord/DiscordService.java 0.00% <0.00%> (ø)
...t/claim/service/DiscordItemClaimReportService.java 0.00% <0.00%> (ø)

@yunyoung1819 yunyoung1819 merged commit 5a7c600 into dev Nov 14, 2023
1 check passed
@yunyoung1819 yunyoung1819 deleted the feature/discord-monitoring branch November 14, 2023 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😺 API Server Api Domain ✨feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Report to Discord Channel
3 participants