diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/media/Media.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/media/Media.kt index 10d887ee..a5a12785 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/media/Media.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/media/Media.kt @@ -48,7 +48,6 @@ class Media( return id == other.id } - override fun hashCode(): Int = id.hashCode() override fun toString(): String { diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelineobject/TimelineObject.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelineobject/TimelineObject.kt index c88ed75f..bdce1a0d 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelineobject/TimelineObject.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/domain/model/timelineobject/TimelineObject.kt @@ -61,9 +61,9 @@ class TimelineObject( lastUpdatedAt = Instant.now() isPureRepost = post.repostId != null && - post.replyId == null && - post.text.isEmpty() && - post.overview?.overview.isNullOrEmpty() + post.replyId == null && + post.text.isEmpty() && + post.overview?.overview.isNullOrEmpty() warnFilters = filterResults.map { TimelineObjectWarnFilter(it.filter.id, it.matchedKeyword) } } diff --git a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/timeline/AbstractTimelineStore.kt b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/timeline/AbstractTimelineStore.kt index 829a1fb7..50801dc2 100644 --- a/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/timeline/AbstractTimelineStore.kt +++ b/hideout-core/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/timeline/AbstractTimelineStore.kt @@ -243,8 +243,8 @@ abstract class AbstractTimelineStore(private val idGenerateService: IdGenerateSe val actors = getActors( timelineObjectList.map { it.postActorId } + - timelineObjectList.mapNotNull { it.repostActorId } + - timelineObjectList.mapNotNull { it.replyActorId } + timelineObjectList.mapNotNull { it.repostActorId } + + timelineObjectList.mapNotNull { it.replyActorId } ) val postMap = posts.associate { post -> @@ -253,7 +253,7 @@ abstract class AbstractTimelineStore(private val idGenerateService: IdGenerateSe val mediaMap = getMedias( posts.flatMap { it.mediaIds } + - actors.mapNotNull { it.value.icon } + actors.mapNotNull { it.value.icon } ) return PaginationList( diff --git a/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/infrastructure/exposedquery/ExposedStatusQueryService.kt b/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/infrastructure/exposedquery/ExposedStatusQueryService.kt index a4224529..452a5a5d 100644 --- a/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/infrastructure/exposedquery/ExposedStatusQueryService.kt +++ b/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/infrastructure/exposedquery/ExposedStatusQueryService.kt @@ -61,10 +61,10 @@ class StatusQueryServiceImpl : StatusQueryService { .select(Posts.columns) .where { Posts.visibility eq Visibility.PUBLIC.name or - (Posts.visibility eq Visibility.UNLISTED.name) or - (Posts.visibility eq Visibility.DIRECT.name and (PostsVisibleActors.actorId eq principal.actorId.id)) or - (Posts.visibility eq Visibility.FOLLOWERS.name and (Relationships.blocking eq false and (relationshipsAlias[Relationships.following] eq true))) or - (Posts.actorId eq principal.actorId.id) + (Posts.visibility eq Visibility.UNLISTED.name) or + (Posts.visibility eq Visibility.DIRECT.name and (PostsVisibleActors.actorId eq principal.actorId.id)) or + (Posts.visibility eq Visibility.FOLLOWERS.name and (Relationships.blocking eq false and (relationshipsAlias[Relationships.following] eq true))) or + (Posts.actorId eq principal.actorId.id) } .alias("authorized_table") } diff --git a/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/StatusesRequest.kt b/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/StatusesRequest.kt index 3e4e0b02..9a97d9a5 100644 --- a/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/StatusesRequest.kt +++ b/hideout-mastodon/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/StatusesRequest.kt @@ -66,8 +66,8 @@ class StatusesRequest { override fun toString(): String { return "StatusesRequest(status=$status, mediaIds=$media_ids, poll=$poll, inReplyToId=$in_reply_to_id, " + - "sensitive=$sensitive, spoilerText=$spoiler_text, visibility=$visibility, language=$language," + - " scheduledAt=$scheduled_at)" + "sensitive=$sensitive, spoilerText=$spoiler_text, visibility=$visibility, language=$language," + + " scheduledAt=$scheduled_at)" } @Suppress("EnumNaming", "EnumEntryNameCase")