Skip to content

Commit 28349d4

Browse files
committed
apply spotless
1 parent f2623e8 commit 28349d4

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

application/src/main/java/org/togetherjava/tjbot/features/help/HelpThreadLifecycleListener.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ void handleArchiveStatus(Instant closedAt, long id, JDA jda) {
8888
if (threadChannel == null) {
8989
logger.info("thread with id: {} no longer exists, marking archived in records", id);
9090
database.write(context -> context.update(HELP_THREADS)
91-
.set(HELP_THREADS.CLOSED_AT, closedAt)
92-
.set(HELP_THREADS.TICKET_STATUS, HelpSystemHelper.TicketStatus.ARCHIVED.val)
93-
.where(HELP_THREADS.CHANNEL_ID.eq(id))
94-
.execute());
91+
.set(HELP_THREADS.CLOSED_AT, closedAt)
92+
.set(HELP_THREADS.TICKET_STATUS, HelpSystemHelper.TicketStatus.ARCHIVED.val)
93+
.where(HELP_THREADS.CHANNEL_ID.eq(id))
94+
.execute());
9595
return;
9696
}
9797

@@ -100,12 +100,12 @@ void handleArchiveStatus(Instant closedAt, long id, JDA jda) {
100100
int participantsExceptAuthor = threadChannel.getMemberCount() - 1;
101101

102102
database.write(context -> context.update(HELP_THREADS)
103-
.set(HELP_THREADS.CLOSED_AT, closedAt)
104-
.set(HELP_THREADS.TICKET_STATUS, HelpSystemHelper.TicketStatus.ARCHIVED.val)
105-
.set(HELP_THREADS.MESSAGE_COUNT, messageCount)
106-
.set(HELP_THREADS.PARTICIPANTS, participantsExceptAuthor)
107-
.where(HELP_THREADS.CHANNEL_ID.eq(threadId))
108-
.execute());
103+
.set(HELP_THREADS.CLOSED_AT, closedAt)
104+
.set(HELP_THREADS.TICKET_STATUS, HelpSystemHelper.TicketStatus.ARCHIVED.val)
105+
.set(HELP_THREADS.MESSAGE_COUNT, messageCount)
106+
.set(HELP_THREADS.PARTICIPANTS, participantsExceptAuthor)
107+
.where(HELP_THREADS.CHANNEL_ID.eq(threadId))
108+
.execute());
109109

110110
logger.info("Thread with id: {}, updated to archived status in database", threadId);
111111

application/src/main/java/org/togetherjava/tjbot/features/help/MarkHelpThreadCloseInDBRoutine.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package org.togetherjava.tjbot.features.help;
22

33
import net.dv8tion.jda.api.JDA;
4-
import net.dv8tion.jda.api.entities.channel.concrete.ThreadChannel;
54
import org.slf4j.Logger;
65
import org.slf4j.LoggerFactory;
76

@@ -59,6 +58,7 @@ private void updateTicketStatus(JDA jda) {
5958
.map(HelpThreadsRecord::getChannelId)
6059
.toList());
6160

62-
threadIdsToClose.forEach(id -> helpThreadLifecycleListener.handleArchiveStatus(now, id, jda));
61+
threadIdsToClose
62+
.forEach(id -> helpThreadLifecycleListener.handleArchiveStatus(now, id, jda));
6363
}
6464
}

0 commit comments

Comments
 (0)