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

Release #94

Merged
merged 2 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public Mono<MemberEntity> createNewMember(String username, String profileImageUr
return memberRepository.save(memberEntity)
.flatMap(savedMember ->
slackService.sendNewMemberNotification(
memberEntity.getSerialNumber(),
memberEntity.getId(),
memberEntity.getName(),
memberEntity.getProfileImageUrl(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public Mono<Void> sendErrorNotification(String requestMemberId, String method, S
}).then();
}

public Mono<Void> sendNewMemberNotification(String memberId, String memberName, String memberProfileImageUrl, String memberCreatedAt, String userAgent) {
public Mono<Void> sendNewMemberNotification(Integer serialNumber, String memberId, String memberName, String memberProfileImageUrl, String memberCreatedAt, String userAgent) {
return Mono.fromCallable(() -> {
List<LayoutBlock> layoutBlocks = new ArrayList<>();

Expand All @@ -122,6 +122,15 @@ public Mono<Void> sendNewMemberNotification(String memberId, String memberName,
layoutBlocks.add(divider());

// Content 삽입
MarkdownTextObject serialNumberMarkdown =
MarkdownTextObject.builder().text("`Serial #`\n" + serialNumber).build();

layoutBlocks.add(
section(
section -> section.fields(List.of(serialNumberMarkdown))
)
);

MarkdownTextObject userIdMarkdown =
MarkdownTextObject.builder().text("`사용자 ID`\n" + memberId).build();

Expand All @@ -146,12 +155,12 @@ public Mono<Void> sendNewMemberNotification(String memberId, String memberName,
)
);

MarkdownTextObject userUserAgentMarkdown =
MarkdownTextObject userAgentMarkdown =
MarkdownTextObject.builder().text("`가입 환경`\n" + userAgent).build();

layoutBlocks.add(
section(
section -> section.fields(List.of(userUserAgentMarkdown))
section -> section.fields(List.of(userAgentMarkdown))
)
);

Expand Down
Loading