I am building a “party app” where users that join a party can talk to other users that have also joined that party. Once the party ends, all of the messages for that party get deleted.
I have a party content type with your usual things like title, description and all of that.
Users have their usual info but i have a rudimentary tag system (list of texts). When the user joins the party they get a tag of “party name” (so they can be part of multiple parties if needed). My approach was to also tag the users messages with this same “party name” and perform an action on the date/time the party ends saying something to the effect of:
-
Once the party ends, take the "party name tag off the user.
-
Delete all messages with the “party name” tag.
I just want to make sure that this is the correct way to go about this or if there isn’t a more efficient way to accomplish this.