From e9b2c2fece1100cd3346583132d26cd7a726ce7b Mon Sep 17 00:00:00 2001 From: violine1101 Date: Wed, 9 Oct 2024 00:16:49 +0200 Subject: [PATCH] Correctly map comments from anonymous users --- src/main/kotlin/io/github/mojira/arisa/Executor.kt | 2 +- .../io/github/mojira/arisa/infrastructure/jira/Mappers.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/io/github/mojira/arisa/Executor.kt b/src/main/kotlin/io/github/mojira/arisa/Executor.kt index bcfd4bdb..b2093cbb 100644 --- a/src/main/kotlin/io/github/mojira/arisa/Executor.kt +++ b/src/main/kotlin/io/github/mojira/arisa/Executor.kt @@ -139,7 +139,7 @@ private fun getSearchResultsFromJira( config ) } catch (exception: Exception) { - log.error("Error mapping bug report ${it.key}:" + exception.message + "\n" + exception.stackTrace) + log.error("Error mapping bug report ${it.key}", exception) null } } diff --git a/src/main/kotlin/io/github/mojira/arisa/infrastructure/jira/Mappers.kt b/src/main/kotlin/io/github/mojira/arisa/infrastructure/jira/Mappers.kt index 92be6d1e..6faeb083 100644 --- a/src/main/kotlin/io/github/mojira/arisa/infrastructure/jira/Mappers.kt +++ b/src/main/kotlin/io/github/mojira/arisa/infrastructure/jira/Mappers.kt @@ -219,7 +219,7 @@ fun JiraComment.toDomain( return Comment( id, body, - author.toDomain(jiraClient, config), + author?.toDomain(jiraClient, config), updateAuthor?.toDomain(jiraClient, config), { getGroups(jiraClient, author.name).fold({ null }, { it }) }, { if (updateAuthor == null) emptyList() else getGroups(jiraClient, updateAuthor.name).fold({ null }, { it }) },