How to build a public chat?

Hey everyone, I would like to build a public chat for my website on Bubble, I tried to do it…but, it didn’t turn out very well. I am not sure how to do it, I currently have 2 fields in my Chat database; Sender -> User type and Message -> Text type. I don’t know where to go about structuring and making it actually become a chat.

Hey @GregoryKing ,

Can you choose to who you want to send your message, or everyone can see it? I personally developed my own online chat website (sorry it’s in french…) but here’s the link: http://boite.bubbleapps.io (just click on “Rejoindre le Chat”). To create it, I followed the second and the third lesson (the SignUp/LogIn and the one with the City Vote). If it’s like mine you want to create it, just follow my steps :wink:.

This is my Message type in the database:

Create a repeating group with the Sender’s email (or anything you want the name of the person be) and a text that’s set as the Message’s Content.

This is the text that shows the Message’s creator’s (Sender) username:

This is the text that shows the Message’s Content:

And this is the Repeating Group settings:

If you can’t understand this comment or that you have a question, just feel free to ask!
Boite

The complexity comes with creating “chat sessions” between two (or more) users.

So a Whatsapp style chat.

That needs to you create the “Session” with a list of Users who are participating. And the “Messages” which are part of that “Session”.

You might also want to add a list of “Sessions” to the User table, rather than search through the whole Session table looking for the current user.

Note that this does not allow you to have “read receipts” for each participant. For that you need another table, which is Message-Participant (so a Message and a User)