Hi… I am trying to create a custom route that finds all messages with specific conversation id, where the sender is not the user id i am passing and where is_read is set to false and update to is_read:true…
So all messages NOT sent from this user that belong in the conversation of the user to be marked as read in other words. But i can’t manage to find out how. Could anyone help with this?
async bulkread(ctx) {
const { conversation, user } = ctx.params;
let entities;
entities = await strapi.services.message.update({ conversation:conversation, sender_ne:user, is_read:false },{is_read:true});
return entities;
},