File tree Expand file tree Collapse file tree 4 files changed +7
-11
lines changed
Expand file tree Collapse file tree 4 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -3976,7 +3976,7 @@ class ChatActivity :
39763976
39773977 override fun onClickReaction (chatMessage : ChatMessage , emoji : String ) {
39783978 if (! participantPermissions.hasReactPermission()) {
3979- Snackbar .make(binding.root, R .string.nc_common_error_sorry , Snackbar .LENGTH_LONG ).show()
3979+ Snackbar .make(binding.root, R .string.reaction_forbidden , Snackbar .LENGTH_LONG ).show()
39803980 return
39813981 }
39823982 VibrationUtils .vibrateShort(context)
@@ -3997,7 +3997,7 @@ class ChatActivity :
39973997 roomToken,
39983998 chatMessage,
39993999 conversationUser,
4000- participantPermissions.hasChatPermission (),
4000+ participantPermissions.hasReactPermission (),
40014001 ncApi
40024002 ).show()
40034003 }
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ class ShowReactionsDialog(
4747 private val roomToken : String ,
4848 private val chatMessage : ChatMessage ,
4949 private val user : User ? ,
50- private val hasChatPermission : Boolean ,
50+ private val hasReactPermission : Boolean ,
5151 private val ncApi : NcApi
5252) : BottomSheetDialog(activity),
5353 ReactionItemClickListener {
@@ -185,7 +185,7 @@ class ShowReactionsDialog(
185185 }
186186
187187 override fun onClick (reactionItem : ReactionItem ) {
188- if (hasChatPermission && reactionItem.reactionVoter.actorId?.equals(user?.userId) == true ) {
188+ if (hasReactPermission && reactionItem.reactionVoter.actorId?.equals(user?.userId) == true ) {
189189 deleteReaction(chatMessage, reactionItem.reaction!! )
190190 adapter?.list?.remove(reactionItem)
191191 dismiss()
Original file line number Diff line number Diff line change @@ -76,13 +76,8 @@ class ParticipantPermissions(
7676 // Server supports separate react permission - check REACT bit
7777 return hasReactPermission
7878 }
79- if (CapabilitiesUtil .hasSpreedFeatureCapability(spreedCapabilities, SpreedFeatures .CHAT_PERMISSION )) {
80- // Older server without react-permission capability - fall back to CHAT permission
81- // as that's what controlled reactions before the split
82- return hasChatPermission
83- }
84- // if capability is not available then the spreed version doesn't support to restrict this
85- return true
79+ // Older server without react-permission capability - fall back to chat permission
80+ return hasChatPermission()
8681 }
8782
8883 companion object {
Original file line number Diff line number Diff line change @@ -550,6 +550,7 @@ How to translate with transifex:
550550 <string name =" read_storage_no_permission" >Sharing files from storage is not possible without permissions</string >
551551 <string name =" open_in_files_app" >Open in Files app</string >
552552 <string name =" send_to_forbidden" >You are not allowed to share content to this chat</string >
553+ <string name =" reaction_forbidden" >You are not allowed to add or remove reactions in this conversation</string >
553554
554555 <string name =" typing_is_typing" >is typing …</string >
555556 <string name =" typing_are_typing" >are typing …</string >
You can’t perform that action at this time.
0 commit comments