(frontend) add UI support for reaction limit on comments

Prevent users from adding more reactions once the per-message
limit has been exceeded. It Disables reaction buttons
when limit is reached

Signed-off-by: Mohamed El Amine BOUKERFA <boukerfa.ma@gmail.com>
This commit is contained in:
Mohamed El Amine BOUKERFA
2026-06-15 08:56:45 +02:00
committed by Manuel Raynaud
parent 867583a52a
commit 51364e3d3c
4 changed files with 27 additions and 5 deletions
+5 -3
View File
@@ -3234,9 +3234,11 @@ class CommentViewSet(
permission_classes = [permissions.CommentPermission]
pagination_class = Pagination
serializer_class = serializers.CommentSerializer
queryset = models.Comment.objects.select_related("user").prefetch_related(
"reactions__users"
).all()
queryset = (
models.Comment.objects.select_related("user")
.prefetch_related("reactions__users")
.all()
)
def get_queryset(self):
"""Override to filter on related resource."""