def get_queryset(self, request):
return (
super().get_queryset(request)
.annotate(participants_count=Count('participants', distinct=True))
.annotate(messages_count=Count('messages', distinct=True))
)