Skip to content

Commit 5d0c6f5

Browse files
authored
release: 1.2.7 (#254)
2 parents 942c62c + 6d25ae6 commit 5d0c6f5

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

src/main/kotlin/org/gitanimals/guild/app/CreateGuildFacade.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,6 @@ class CreateGuildFacade(
115115

116116
private companion object {
117117
private const val IDEMPOTENCY_KEY = "IDEMPOTENCY_KEY"
118-
private const val CREATE_GUILD_COST = 30_000
118+
private const val CREATE_GUILD_COST = 10_000
119119
}
120120
}

src/main/kotlin/org/gitanimals/guild/app/JoinGuildFacade.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class JoinGuildFacade(
5757
userId = it.userId,
5858
newUserImage = member.profileImage,
5959
newUserName = member.username,
60+
guildId = guild.id,
6061
guildTitle = guild.getTitle(),
6162
)
6263
)
@@ -72,6 +73,7 @@ class JoinGuildFacade(
7273
userId = guild.getLeaderUserId(),
7374
newUserImage = member.profileImage,
7475
newUserName = member.username,
76+
guildId = guild.id,
7577
guildTitle = guild.getTitle(),
7678
)
7779
)
@@ -84,7 +86,9 @@ class JoinGuildFacade(
8486
sagaManager.startSync(
8587
InboxInputEvent.sentJoinRequest(
8688
userId = member.id.toLong(),
89+
guildId = guild.id,
8790
guildTitle = guild.getTitle(),
91+
guildIcon = guild.getGuildIcon(),
8892
)
8993
)
9094
}

src/main/kotlin/org/gitanimals/guild/app/event/InboxInputEvent.kt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ data class InboxInputEvent(
2828
userId: Long,
2929
newUserImage: String,
3030
newUserName: String,
31+
guildId: Long,
3132
guildTitle: String,
3233
): InboxInputEvent {
3334
return InboxInputEvent(
@@ -40,13 +41,14 @@ data class InboxInputEvent(
4041
title = "New user join",
4142
body = "$newUserName join $guildTitle guild.",
4243
image = newUserImage,
43-
redirectTo = "",
44+
redirectTo = "/guild/$guildId",
4445
)
4546
)
4647
}
4748

4849
fun guildJoinRequest(
4950
userId: Long,
51+
guildId: Long,
5052
newUserImage: String,
5153
newUserName: String,
5254
guildTitle: String,
@@ -61,14 +63,16 @@ data class InboxInputEvent(
6163
title = "Guild join request",
6264
body = "$newUserName has sent a join request to the $guildTitle guild.",
6365
image = newUserImage,
64-
redirectTo = "",
66+
redirectTo = "/guild/$guildId/setting/member",
6567
)
6668
)
6769
}
6870

6971
fun sentJoinRequest(
7072
userId: Long,
73+
guildId: Long,
7174
guildTitle: String,
75+
guildIcon: String,
7276
): InboxInputEvent {
7377
return InboxInputEvent(
7478
publisher = Publisher(
@@ -79,8 +83,8 @@ data class InboxInputEvent(
7983
userId = userId,
8084
title = "Guild join request sent",
8185
body = "Guild join request sent to $guildTitle.",
82-
image = "guild-image", // guild 이미지 추가
83-
redirectTo = "",
86+
image = guildIcon,
87+
redirectTo = "/guild/detail/$guildId",
8488
)
8589
)
8690
}

src/main/kotlin/org/gitanimals/guild/domain/Guild.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ class Guild(
123123
}
124124

125125
fun change(request: ChangeGuildRequest) {
126+
GuildIcons.requireExistImagePath(request.guildIcon)
127+
126128
this.title = request.title
127129
this.body = request.body
128130
this.farmType = request.farmType

0 commit comments

Comments
 (0)