I am developing a feature for unread message notifications, and my plan is as follows:
1. At the initialization of a certain page, I retrieve data with a status of "unread" from Supabase and save it to the "unreadMessages" in appstate.
2. I have set up a badge on a certain page, which will decide whether to display it and the number of messages displayed based on the number of unreadMessages.
3. When the user enters the Message page, I want to notify Supabase to update the status of all unreadMessages in the Message table to "read".
Now I am stuck at the third step because I don't know how to match the id of the Message table in Supabase with the id of unreadMessages.