Skip to content

Commit

Permalink
Merge pull request #705 from Npepperlinux/reblog_target_exclude_direc…
Browse files Browse the repository at this point in the history
…t_specifed

Exclude canReblog target Direct/Specifed
Tlaster authored Feb 1, 2025
2 parents b9c0d07 + 8479d35 commit 58a6934
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -181,7 +181,7 @@ private fun Status.renderStatus(
requireNotNull(account) { "actualStatus.account is null" }
val actualUser = account.render(accountKey, host)
val isFromMe = actualUser.key == accountKey
val canReblog = visibility in listOf(Visibility.Public, Visibility.Unlisted) || isFromMe
val canReblog = visibility in listOf(Visibility.Public, Visibility.Unlisted) || (isFromMe && visibility != Visibility.Direct)
val statusKey =
MicroBlogKey(
id = id ?: throw IllegalArgumentException("mastodon Status.id should not be null"),
Original file line number Diff line number Diff line change
@@ -290,7 +290,7 @@ internal fun Note.renderStatus(
}
val user = user.render(accountKey)
val isFromMe = user.key == accountKey
val canReblog = visibility in listOf(Visibility.Public, Visibility.Home) || isFromMe
val canReblog = visibility in listOf(Visibility.Public, Visibility.Home) || (isFromMe && visibility != Visibility.Specified)
val renderedVisibility =
when (visibility) {
Visibility.Public -> UiTimeline.ItemContent.Status.TopEndContent.Visibility.Type.Public

0 comments on commit 58a6934

Please sign in to comment.