mirror of https://github.com/usbharu/Hideout.git
fix: #214
This commit is contained in:
parent
b3723da219
commit
8a7ff91a95
|
@ -6,9 +6,9 @@ open class Person
|
||||||
@Suppress("LongParameterList")
|
@Suppress("LongParameterList")
|
||||||
constructor(
|
constructor(
|
||||||
type: List<String> = emptyList(),
|
type: List<String> = emptyList(),
|
||||||
override val name: String,
|
val name: String?,
|
||||||
override val id: String,
|
override val id: String,
|
||||||
var preferredUsername: String?,
|
var preferredUsername: String,
|
||||||
var summary: String?,
|
var summary: String?,
|
||||||
var inbox: String,
|
var inbox: String,
|
||||||
var outbox: String,
|
var outbox: String,
|
||||||
|
@ -19,7 +19,7 @@ constructor(
|
||||||
var followers: String?,
|
var followers: String?,
|
||||||
var following: String?,
|
var following: String?,
|
||||||
val manuallyApprovesFollowers: Boolean? = false
|
val manuallyApprovesFollowers: Boolean? = false
|
||||||
) : Object(add(type, "Person")), HasId, HasName {
|
) : Object(add(type, "Person")), HasId {
|
||||||
|
|
||||||
@Suppress("CyclomaticComplexMethod", "CognitiveComplexMethod")
|
@Suppress("CyclomaticComplexMethod", "CognitiveComplexMethod")
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
|
|
|
@ -96,7 +96,7 @@ class APUserServiceImpl(
|
||||||
name = person.preferredUsername
|
name = person.preferredUsername
|
||||||
?: throw IllegalActivityPubObjectException("preferredUsername is null"),
|
?: throw IllegalActivityPubObjectException("preferredUsername is null"),
|
||||||
domain = id.substringAfter("://").substringBefore("/"),
|
domain = id.substringAfter("://").substringBefore("/"),
|
||||||
screenName = person.name,
|
screenName = person.name ?: person.preferredUsername,
|
||||||
description = person.summary.orEmpty(),
|
description = person.summary.orEmpty(),
|
||||||
inbox = person.inbox,
|
inbox = person.inbox,
|
||||||
outbox = person.outbox,
|
outbox = person.outbox,
|
||||||
|
|
Loading…
Reference in New Issue