Skip to content

Commit 113f4b2

Browse files
authored
Fixes quotation marks in titles on /transfer (#1335)
1 parent f3b36c7 commit 113f4b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

application/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ public void onMessageContext(MessageContextInteractionEvent event) {
100100
.formatted(originalMessage);
101101
Optional<String> chatGptTitle = chatGptService.ask(chatGptTitleRequest, null);
102102
String title = chatGptTitle.orElse(createTitle(originalMessage));
103+
if (title.startsWith("\"") && title.endsWith("\"")) {
104+
title = title.substring(1, title.length() - 1);
105+
}
106+
103107
if (title.length() > TITLE_MAX_LENGTH) {
104108
title = title.substring(0, TITLE_MAX_LENGTH);
105109
}

0 commit comments

Comments
 (0)