With the new comments collection, you can achieve both a global chat and 1:1 chats.
Data Editor
In both cases, in the Data Editor, you’ll need one Comments table. All messages of all chats will appear in this Comments table.
- For the global chat, 4 basic columns: Comment, Timestamp, User Name, User Photo
- For 1:1 chats, 3 additional basic columns: ChatPerson1, ChatPerson2, ChatID. In the ChatPerson columns, write the email addresses of the people chatting. ChatID is a template column. My ChatIDs are not the best since I actually have two possible IDs per unique (X-Y and Y-X), there might be a better way to do this.
Display Editor
- Global chat: new screen with the Comments table as source, add Comments component, point to data, filter the data to show only rows where ChatPerson1 or ChatPerson2 are empty (or ChatID is “-”).
- 1:1 chat: Add the Comments component to the User Profile screen, adjust visibility (email isn’t signed-in user), filter data along the ChatID (ChatID includes user email and ChatID includes screen email).