Yeah, that’s the correct way of thinking, if we can simplify things by getting them from the database, will lead to less complexity, that may be the case of nested for
loops. But sometimes it’s just not worth it!
Maybe a other way around for your solution is to save the invitation message into the database, and only display the message with: “EXPIRED” directly on the clients: js, admin or apis.