Open damascene opened 4 years ago
Steps to reproduce:
Result: User A will get the red envelope when refreshing the page. Clicking on the envelope will lead them to their empty notifications inbox.
The red envelope will continue to appear in the top bar until user A views the thread with the new comment.
The database shows "1" new_response_count
and "0" seen_response_count
, after user B created the comment. When user A opens the corresponsing thread, new_response_count
and seen_response_count
become "0" and "1", respectively, and the red envelope vanishes.
Analysis:
askbot_post
, which is how comments are implemented.postrevision
by user 4. There is also another Activity recorded immediately afterwards, with content_type post
, for user 1.
postrevision
Activity is of type 4, i.e. TYPE_ACTIVITY_COMMENT_ANSWER
. The name describes what I did. This type is listed in RESPONSE_ACTIVITY_TYPES_FOR_DISPLAY
STATUS_NEW
. This is what makes the new_response_count
increase and ultimately makes Askbot show the red envelope. The red envelope is intended behaviour. The issue is that the notifications list remains empty!askbot.views.users.user_responses()
.
memo
s, retrieved as memo_set
memo.activity.content_object
is None
content_object
is a GenericForeignKey
. Its use in askbot.models.user.Activity
matches the fine manual.messages
in Jinja?
Addressed and merged. As far as I can tell, this issue has been fixed and may be closed.
On the 0.11.x version after I get a notification, I click on the red envelope icon but the page doesn't display any notification.
I've tested on Desktop and mobile version too.