Closed NovaFox161 closed 2 years ago
I think the symptom may be because the calendarNumber is being cached?
DisCal-Discord-Bot\client\src\main\kotlin\org\dreamexposure\discal\client\service\AnnouncementService.kt
private fun getCalendar(guild: Guild, announcement: Announcement): Mono<Calendar> {
val cached = getCached(announcement.guildId)
return if (!cached.calendars.contains(announcement.calendarNumber)) {
guild.getCalendar(announcement.calendarNumber)
.doOnNext { cached.calendars[it.calendarNumber] = it }
} else Mono.justOrEmpty(cached.calendars[announcement.calendarNumber])
}
Looks more like some fields are not being set correctly when fetching from the database. Not sure what happened here. (Affects all announcement fetch methods) https://github.com/DreamExposure/DisCal-Discord-Bot/blob/77d6f9cec1ac34694edc4b6136aa7a471a5ce904/core/src/main/kotlin/org/dreamexposure/discal/core/database/DatabaseManager.kt#L774-L776
Resolved in 73a5229ed1705a8a58af05fb69dd613dd104ba71
Will go live in 4.2.2
This seemed to have only affected when an announcement is fetched by ID, so it has a limited scope of impact.
Who is the bug affecting?
Any users with multiple calendars
What is affected by this bug?
Announcements sent to a calendar other than the first, revert to the first
When does this occur?
Whenever an announcement is created/edited
Where on the platform does it happen?
Bot
How do we replicate the issue?
Read above