mirror of https://github.com/usbharu/Hideout.git
fix: アカウントの投稿一覧の取得のバグを修正
This commit is contained in:
parent
8703a45fc2
commit
8d24b366e4
|
@ -101,8 +101,8 @@ class StatusQueryServiceImpl : StatusQueryService {
|
|||
val statuses = resolveReplyAndRepost(pairs)
|
||||
return PaginationList(
|
||||
statuses,
|
||||
statuses.lastOrNull()?.id?.toLongOrNull(),
|
||||
statuses.firstOrNull()?.id?.toLongOrNull()
|
||||
statuses.firstOrNull()?.id?.toLongOrNull(),
|
||||
statuses.lastOrNull()?.id?.toLongOrNull()
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,9 @@ class StatusQueryServiceImpl : StatusQueryService {
|
|||
}
|
||||
.map {
|
||||
if (it.inReplyToId != null) {
|
||||
it.copy(inReplyToAccountId = statuses.find { (id) -> id == it.inReplyToId }?.id)
|
||||
println("statuses trace: $statuses")
|
||||
println("inReplyToId trace: ${it.inReplyToId}")
|
||||
it.copy(inReplyToAccountId = statuses.find { (id) -> id == it.inReplyToId }?.account?.id)
|
||||
} else {
|
||||
it
|
||||
}
|
||||
|
|
|
@ -88,8 +88,8 @@ class MastodonAccountApiController(
|
|||
)
|
||||
)
|
||||
val httpHeader = statuses.toHttpHeader(
|
||||
{ "${applicationConfig.url}/api/v1/accounts/$id/statuses?max_id=$it" },
|
||||
{ "${applicationConfig.url}/api/v1/accounts/$id/statuses?min_id=$it" },
|
||||
{ "${applicationConfig.url}/api/v1/accounts/$id/statuses?max_id=$it" },
|
||||
)
|
||||
|
||||
if (httpHeader != null) {
|
||||
|
|
|
@ -87,6 +87,8 @@ class AccountApiServiceImpl(
|
|||
): PaginationList<Status, Long> {
|
||||
val canViewFollowers = if (loginUser == null) {
|
||||
false
|
||||
}else if(loginUser == userid) {
|
||||
true
|
||||
} else {
|
||||
transaction.transaction {
|
||||
isFollowing(loginUser, userid)
|
||||
|
|
Loading…
Reference in New Issue