Hey there, in my app users can message each other. When they are on a users profile that they think is a match they will click message. This will then create a convo but it won’t send an initial message. Sometimes users won’t send a message and a blank conversation is still visible. Does anyone know a work flow to get rid of them?
By convo … you mean … a threadEntryInTheDatabase?
One way could be that on creation of the entry or entries, schedule their deletion at a certain point in the future if they are empty
You can definitely do it the way Carlos described, but I’m just curious… what does the flow (UI) look like for not sending the initial message? So the user clicks message and then decides not to send it… do they click a cancel button or something to get out of the message flow?
I’m guessing they can just “abandon” the flow, and then you will likely have to go with what Carlos described because you don’t have a definitive action for leaving the flow. If you do have such an action, I’m thinking you can simply delete the empty conversation and message when that action is taken.
I echo Mike …. what does the user see after clicking message?
(Hint: may save you WUs….)
Thanks man. Can the schedule deletion be done without an API?
Here’s what happens when they click message. It creates an empty conversation
Yup, I understand they click message and it creates an empty conversation (which I assume is by design). You are asking how you can delete that conversation if they leave that area without sending a message that is related to the conversation, right? If that is correct, I am asking how they leave that area without sending a message.
Ah got you. The page opens up in a new tab so they can either close the tab, click back or on our logo which takes them back to the home page.
Assuming they leave the area clicking somewhere or something…. Just monitor for the absence of a message and delete the thread right there. If they were to close a browser tab …. have a recurring periodic workflow to delete orphaned conversations.
Another approach is just to show the UI (just display texts including the app’s first “message”) without creating the thread …. and just create the dataBaseThread and dataBaseMessage upon a new message being actually created by the user
I didn’t expect you to say it opened in a new tab, but as I suspected, you don’t have a definitive action for leaving the area. You could do the things that Carlos mentioned or you could consider using a plugin like this one to detect when it seems like the user is about to leave the page, and you could show a popup if they haven’t sent a message to see if they really intend to abandon the conversation. If they reply affirmatively to the popup, you could delete the empty conversation.
By the way, I would never do what I just described because those kinds of popups are an abomination, in my opinion, but it’s still an option.
We Solved this by using url Params
Messaging a user not in Your current conversations list happens in a feed on a different screen than where messaging takes place.
On page change we send the recipients uniqueid as a url param. This controls some conditionals to achieve the desired ui as well as workflows to create the convo and messages only after the first message has been sent.