mirror of https://github.com/usbharu/Hideout.git
fix: ブロックされたときブロックされたactorからブロックしたactorへのフォローを解除するように
This commit is contained in:
parent
2dd0bfcb8d
commit
686fecf0bc
|
@ -23,7 +23,7 @@ class RelationshipRepositoryImpl : RelationshipRepository {
|
||||||
it[targetUserId] = relationship.targetUserId
|
it[targetUserId] = relationship.targetUserId
|
||||||
it[following] = relationship.following
|
it[following] = relationship.following
|
||||||
it[blocking] = relationship.blocking
|
it[blocking] = relationship.blocking
|
||||||
it[muting] = relationship.blocking
|
it[muting] = relationship.muting
|
||||||
it[followRequest] = relationship.followRequest
|
it[followRequest] = relationship.followRequest
|
||||||
it[ignoreFollowRequestFromTarget] = relationship.ignoreFollowRequestFromTarget
|
it[ignoreFollowRequestFromTarget] = relationship.ignoreFollowRequestFromTarget
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ class RelationshipRepositoryImpl : RelationshipRepository {
|
||||||
}) {
|
}) {
|
||||||
it[following] = relationship.following
|
it[following] = relationship.following
|
||||||
it[blocking] = relationship.blocking
|
it[blocking] = relationship.blocking
|
||||||
it[muting] = relationship.blocking
|
it[muting] = relationship.muting
|
||||||
it[followRequest] = relationship.followRequest
|
it[followRequest] = relationship.followRequest
|
||||||
it[ignoreFollowRequestFromTarget] = relationship.ignoreFollowRequestFromTarget
|
it[ignoreFollowRequestFromTarget] = relationship.ignoreFollowRequestFromTarget
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,13 @@ class RelationshipServiceImpl(
|
||||||
ignoreFollowRequestFromTarget = false
|
ignoreFollowRequestFromTarget = false
|
||||||
)
|
)
|
||||||
|
|
||||||
|
val inverseRelationship = relationshipRepository.findByUserIdAndTargetUserId(targetId, userId)
|
||||||
|
?.copy(followRequest = false, following = false)
|
||||||
|
|
||||||
relationshipRepository.save(relationship)
|
relationshipRepository.save(relationship)
|
||||||
|
if (inverseRelationship != null) {
|
||||||
|
relationshipRepository.save(inverseRelationship)
|
||||||
|
}
|
||||||
|
|
||||||
val remoteUser = isRemoteUser(targetId)
|
val remoteUser = isRemoteUser(targetId)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue