Skip to content

Commit 4e0f7de

Browse files
committed
Update static messages on rsvp status changes to support refreshing new static message types with rsvp info
1 parent ecd2bdf commit 4e0f7de

File tree

1 file changed

+5
-0
lines changed
  • core/src/main/kotlin/org/dreamexposure/discal/core/business

1 file changed

+5
-0
lines changed

core/src/main/kotlin/org/dreamexposure/discal/core/business/RsvpService.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class RsvpService(
2323
private val rsvpCache: RsvpCache,
2424
private val embedService: EmbedService,
2525
private val calendarService: CalendarService,
26+
private val staticMessageService: StaticMessageService,
2627
private val beanFactory: BeanFactory,
2728
) {
2829
private val discordClient: DiscordClient
@@ -64,6 +65,9 @@ class RsvpService(
6465
).map(::Rsvp).awaitSingle()
6566

6667
rsvpCache.put(rsvp.guildId, rsvp.eventId, saved)
68+
69+
staticMessageService.updateStaticMessages(rsvp.guildId, rsvp.calendarNumber)
70+
6771
return saved
6872
}
6973

@@ -141,6 +145,7 @@ class RsvpService(
141145

142146

143147
// Do Discord actions
148+
staticMessageService.updateStaticMessages(new.guildId, new.calendarNumber)
144149

145150
// Do role removal
146151
removeOldRoleFrom.forEach { userId ->

0 commit comments

Comments
 (0)