I have a modal with some pre-build prompt templates. You can open the template library, edit the prompts, and then click a button that has a click handler like the one below, designed to take the text content and submit it via the chat, then close the modal.
This works for me when I'm editing the app or previewing the app, but for some reason, when I access it via the public link, the text doesn't get sent to the chat component - the modal does close though, which is the second event handler.
Hmm it looks like the send message event silently fails if there is no username provided
Since we don't track any user information in public apps, the sender's name would be null. You'd have to add some conditional info to populate the sender's name when current_user isn't defined
Perfect, thanks for this @Tess! Can confirm that was the fix and it's working as expected now. For anyone else, I literally just changed it from the default username to {{ current_user.fullName || "You" }}