File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
application/src/main/java/org/togetherjava/tjbot/features/help Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -204,15 +204,18 @@ private RestAction<Message> useChatGptFallbackMessage(ThreadChannel threadChanne
204
204
205
205
void writeHelpThreadToDatabase (long authorId , ThreadChannel threadChannel ) {
206
206
207
- Instant createdAt = Instant .now ();
208
- String tag = threadChannel .getAppliedTags ().getFirst ().getName ();
207
+ Instant createdAt = threadChannel .getTimeCreated ().toInstant ();
208
+ List <String > tagsList =
209
+ threadChannel .getAppliedTags ().stream ().map (ForumTag ::getName ).toList ();
210
+
211
+ String tags = String .join (", " , tagsList );
209
212
210
213
database .write (content -> {
211
214
HelpThreadsRecord helpThreadsRecord = content .newRecord (HelpThreads .HELP_THREADS )
212
215
.setAuthorId (authorId )
213
216
.setChannelId (threadChannel .getIdLong ())
214
217
.setCreatedAt (createdAt )
215
- .setTag (tag )
218
+ .setTag (tags )
216
219
.setTicketStatus (TicketStatus .ACTIVE .val );
217
220
if (helpThreadsRecord .update () == 0 ) {
218
221
helpThreadsRecord .insert ();
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ public void onChannelUpdateAppliedTags(@NotNull ChannelUpdateAppliedTagsEvent ev
64
64
}
65
65
66
66
private void handleThreadStatus (ThreadChannel threadChannel ) {
67
- Instant closedAt = Instant . now ();
67
+ Instant closedAt = threadChannel . getTimeArchiveInfoLastModified (). toInstant ();
68
68
long threadId = threadChannel .getIdLong ();
69
69
70
70
int status = database .read (context -> context .selectFrom (HELP_THREADS )
You can’t perform that action at this time.
0 commit comments