From 8ca28cca048691cdc869f2eb53bce14824f44e78 Mon Sep 17 00:00:00 2001 From: Roman Date: Mon, 29 Jul 2024 10:10:20 +0200 Subject: [PATCH] Unread comments --- src/collective/feedback/restapi/services/get.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/collective/feedback/restapi/services/get.py b/src/collective/feedback/restapi/services/get.py index 8c2e924..1a16a55 100644 --- a/src/collective/feedback/restapi/services/get.py +++ b/src/collective/feedback/restapi/services/get.py @@ -165,6 +165,11 @@ def get_data(self): data["vote_num"] += 1 data["vote_sum"] += vote + # Sign if page has unread comments + data["has_unread"] = data.get("has_unread", False) or feedback._attrs.get( + "read", False + ) + # number of comment comment = feedback._attrs.get("comment", "") answer = feedback._attrs.get("answer", "")