Do you want to broadcast messages to all your users and want to make sure that everyone has read them?
With the must read plugin you can configure a list of nodes that are initially unread for every user. Via the API you can then mark them as read when your user has seen it, so that the user won’t see the node again.
This plugin provides endpoints to fetch all nodes that must be read and to set specific nodes to be already read.
Copy the jar file and the
config directory into the plugin directory
of your mesh Installation. Modify the
storage/graphql/* files to your liking.
The config file allows you to customize the behaviour of the must read plugin. The projects array allows you to define several project for which the must read plugin is active.
With this parameter you define the name for the field containing the
uuids that are read for the unread endpoint. If you leave it blank the
uuids is used
You can define the following parameters for each project:
name: Name of the Mesh Project the plugin is active
folderName: Name of the folder where the plugin stores it’s informations
queryFiles: Configuration for the used queryfiles
uuid: GraphQL file that fetches the ids of the nodes that mus be read
data: GraphQL file that fetches the data you want to receive when accessing the /unread endpoint. This GraphQL file gets the variable $uuids provides by the module to fetch the data for the unread nodes
FieldNames: Names for the specific fields the module should use
uuid: Name of the field in the MustReadGrapQLFile that stores the
uuid. If you don’t specify it or specify it empty the plugin assumes you
published: Name of the fields in the MustReadGraphQLFile that stores
if the current entry is published or not. If you don’t specify it or
specify it empty, the plugin assumes you meant
The must read plugin only activates for projects which are defined in
the config.yml and have
Data: Key (named like NodeListParameterName) containing the uuids that should be marked as read
This endpoints sets the provided uuids as read so that the unread endpoint ignores them for the currently logged in user
Data: Provides a json with the data for all the unread nodes for the currently logged in user. The structure is defined by the dataQueryFile configuration option of the project
Returns the data for the nodes that are unread by the currently logged in user.
The plugin includes developer documentation, but does not provide a management user interface.