Forum Discussion

dustin's avatar
dustin
Expert
10 years ago

How do I get the 'haven't been read by a moderator' status of Message using API?

In the "message-list" component, topics containing messages unread by moderator are flagged with an "RM" icon.  This appears to be different than the moderation_status provided by the Messages API.

 

Can someone provide insight and an example of how to retrieve the "This topic contains messages that haven't been read by moderator" status for a message?

  • Hello StanGromer,
    Unfortunately, there is no such API exist which says moderator read/unread for a message.

    But you can try the following rest call to get the messages read by a particular user: 
    /restapi/vc/users/id/[id] /posts/read (the list of read messages for this user)

    Here, you can pass the moderator's user id and see what are all the messages read by this user. I know this is not a straightforward solution, but that's the only solution we have at the moment.

    Let me know if you need any further help.

    Regards,
    Abhishek Gupta

  • Hello StanGromer,
    Unfortunately, there is no such API exist which says moderator read/unread for a message.

    But you can try the following rest call to get the messages read by a particular user: 
    /restapi/vc/users/id/[id] /posts/read (the list of read messages for this user)

    Here, you can pass the moderator's user id and see what are all the messages read by this user. I know this is not a straightforward solution, but that's the only solution we have at the moment.

    Let me know if you need any further help.

    Regards,
    Abhishek Gupta

  • Anyone find a great solution for this by chance?  We're trying to build a feed specific for our moderators, and really want to use moderator read/unread status.

  • Hi Dustin,

     

    I think this API will help you.

     

    /restapi/vc/messages/id/[id]/moderation/status

     

    If my post is helpful and answers your question, please give "Kudos" and "Accept it as a Solution."

     

    Thank you.

     

    Regards,

    Mahesh Revanwar

    • WietseDijkstra's avatar
      WietseDijkstra
      Guide

      mahesh_revanwardustin,

       

      I would also like to know which API call to use to determine the 'requires moderation' status. Appearantly it's not '/moderation/status'. In our community this always shows '<value type="moderation_status">approved</value>'. Furthermore I would like to know if it is possible to reset this status. When a moderator has read a message, the requires moderation icon dissapears. I would like the option to put back that icon like marking a message as unread.

       

      Regards,

      Wietse