FEATURE: Publish read state on group messages. (#7989)

* Enable or disable read state based on group attribute

* When read state needs to be published, the minimum unread count is calculated in the topic query. This way, we can know if someone reads the last post

* The option can be enabled/disabled from the UI

* The read indicator will live-updated using message bus

* Show read indicator on every post

* The read indicator now shows read count and can be expanded to see user avatars

* Read count gets updated everytime someone reads a message

* Simplify topic-list read indicator logic

* Unsubscribe from message bus on willDestroyElement, removed unnecesarry values from post-menu, and added a comment to explain where does minimum_unread_count comes from
This commit is contained in:
Roman Rizzi
2019-08-20 09:46:57 -03:00
committed by GitHub
parent 15e70cc4b4
commit 1630dae2db
35 changed files with 524 additions and 21 deletions

View File

@ -153,7 +153,8 @@ class Admin::GroupsController < Admin::AdminController
:default_notification_level,
:membership_request_template,
:owner_usernames,
:usernames
:usernames,
:publish_read_state
]
custom_fields = Group.editable_group_custom_fields
permitted << { custom_fields: custom_fields } unless custom_fields.blank?