This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Description
/inbox
"View Inbox" alert triggers When?
What is shown?
Latest announcements or updates from me.
How it is shown?
As a pagination of announcements & updates they've missed. Read updates/announcements are not shown. But can be viewed by clicking "Show Older" button.
Where are updates/new announcements stored?
In a prisma collection. Since the "see inbox" alert is displayed AFTER someone uses the command, or sends message. There is no performance overhead.
How to implement?
Store "lastRead" in userData, and "createdAt" for announcements. Check user's last read dates with announcements' createdAt times, display announcements that were made after their last read time.
Why?
Many users don't know SOO much of InterChat's features. It's sad, really. This should help.
What about new users/first timers of the bot?
Their lastReadTimestamp will start from the moment they used the bot. So only announcements AFTER they used interchat for the first time will be shown to them.
But for hub messages, it'll be annoying!
We will set a redis key that expires after 10 minutes to not disturb the user for every message they send.