I've been using ACS for a while now and I LOVE it, though I'm facing an issue with Messages... especially replies to Threads.
In My App, Users can send Messages to each other, and reply to the Message.
Initially I used
Cloud.Messages.showInbox(function (e) { // threadzzz if (e.success) { var data = []; for (var i = 0; i < e.messages.length; i++) { var message = e.messages[i]; // all read / unread & replied Messagesand for each selected Message, I load in a new Window the full thread Messages by
Cloud.Messages.showThread({ // thread : the selected one thread_id: messageOriginal.thread_id }, function (e) { if (e.success) { // the array of back & forth messages of This ThreadFor the User to Reply to this Message Thread
function sendMessage() { messageTF.blur(); Cloud.Messages.reply({ message_id: messageOriginal.id, // make sure it's this one not thread_id body: messageTF.value, custom_fields: { type: messageOriginal.type}, }, function (e) { if (e.success) {The problem I'm facing is that afterwards... showInbox shows the A replied Thread as a New Thread Message (doubling Threads in my inbox)?
Example: 1. User 1 sends "hello 1" to User 2 2. When User 2 Checks their Inbox... Looks good, see the message 3. When User 2 Replies with "hello 2"... User 1 Sees the Reply in the Same Thread Message... All Good! 4. Now... when User 1 Replies to User 2's Reply... Always Same Thread with "hello 3", User 2 sees the Thread, as a New Thread in showInbox()
Though when you click the cloned new Thread... you see the same Thread as the previous Thread... but in showInbox() it returns the Thread now in 2 seperate Threads.. one with the Users last reply, and the other with the new reply.