N
Novu6mo ago
vikram

In App notification expire

Did novu support to mark app notification expire based on some conditions like if notification is not marked read and seen and 30 days old.
3 Replies
Ask Inkeep
Ask Inkeep6mo ago
Hi @vikram, I'm an AI assistant for Novu. While a team member reviews this question, I'll see if I can find relevant sources for your question. ----------------------------- While I generate an answer, here are some sources that might be helpful: * Step Conditions * How to send WhatsApp Business notifications with Novu * How to send PUSH notifications to iOS devices with FCM using Novu * Frequently Asked Questions -----------------------------
Ask Inkeep
Ask Inkeep6mo ago
Answer Currently, Novu does not support configurable TTL (time-to-live) for in-app notifications based on specific conditions such as being 30 days old and not marked as read or seen. The default expiration for in-app notifications is set to 6 months, and this is not customizable in the self-hosted version (1) (2) . However, a community member has created a pull request to introduce a similar feature, which might be available in future releases (2) . For a workaround, you can manually delete notifications based on your conditions using the delete message API (1) . Here is an example of how you can do this with Node.JS:
const { novu } = require('@novu/node'); // Ensure you have the appropriate import
await novu.messages.deleteById("messageId"); // Replace "messageId" with the actual ID
const { novu } = require('@novu/node'); // Ensure you have the appropriate import
await novu.messages.deleteById("messageId"); // Replace "messageId" with the actual ID
(3)
Pawan Jain
Pawan Jain6mo ago
@vikram In-app notification expiry time can not be configured per notification. As of know it is fixed and same for all notifications
Want results from more Discord servers?
Add your server