Similar to this question, I am attempting to do the following:
- I have a Twilio conversation
C1
with participantsP1
,P2
- I want to create a new conversation with participants
P1
,P2
,P3
As soon as I add P2
to the new convo, I will get the famous "Group MMS with given participant list already exists as Conversation" error and won't ever reach P3
.
I know there is an accepted answer on the link I put, but this is not a scalable solution. Here's why:
I am building a solution where many conversations will be generated simultaneously due to user interactions with my applications. The accepted solution was to add P4
first to the conversation and then remove P4
after I add P3
in order to have a unique conversation. Suppose however that multiple conversations are being generated simultaneously. If one has P4
added already and is yet to attempt to add P1
, then the second someone else tries to add the P4
to the conversation, we would fail there.
Is there another solution to this problem that can actually scale? Would love if there was a way to add all the final participants at once and only then would Twilio check to see if a conversation exists with those participants.