Hi,
Is the replace field from pub head used(https://github.com/tinode/chat/blob/master/docs/API.md#pub) ? I can't find anything than just some css clases in teh react app.
For my app the server stores all replace messages in the original message as edits: [] and the first edit data(content, attachments, etc) is displayed. I feel this is super wrong.
What would be a better way to do it ? I am thinking about replacing the message data(content ,attachments, etc) of the replace: seq message with the new data so when the messages are requested the edited message already has thew new data. Like a PUT request.
Is it better ? Are there better solution ?
Thank you.
I see that the sandbox doesn't have the edit function active so I tried to run the next branch locally.I can not run the next branch of the react app. It says the "tinode-sdk": "^0.21.0-beta1", doesn't exists when I ran npm install.
Also the master branch of the Go server, windows pre build, works with the edits from the above branch ?
I see that you have a list with all the messages that have head.replace, edits. When a message whose seq is found in the list, it will be replaced with the edit.
I find some problems with it
1. Privacy, users can see the content of the old message in the network tab of dev tools. This problem is present in my solution too.
2. If I send a message, seq = 1. Then send 24 edits, seqs from 2 to 24. Then send one more message, seq 25. Considering the app request 24 messages I will not get the first message and considering that these are the first messages there is no scroll top action that will request older messages. The only way to get the first message is to make my window small enought so I can have a scrollbar. Didn't tried but something similar might happen to replies.
Considering these problems from above, why not just PUT/PATCH the message data: content and attachments ?
I don't mean the UI, but the dev tools. If you look in dev tools -> network tab -> ws -> select the tinode connection you can see messages between server and client.
Somebody who knows can look here for the original message.
Let's not forget that somebody could get the keys from requests and make their own client and make it display anything that the server sends back.
For example Facebook Messenger doesn't allow downloading of voice messages from it's UI, but you can get the link and download them from the network tab from dev tools.
What about using another table where all edits are stored with a link to the original message in order to keep the edits and the original so the admin can see them but the clients don't.
There is this post https://groups.google.com/g/tinode/c/zMor7odNf6k . You haven't implemented edits in the sdk then, but now they are and the problem from there can happen with your implementation if you are going to implement a search function like Skype or Facebook Messenger has where the user would jump around the messages list.
Like the origininal message is in the group you request but it's edits are not, so the user won't see the edits but the original.
Also by chaning the edit to a PUT/PATCH style update it could help the search function.
Do you think it would be a complicated change to do ?
--
You received this message because you are subscribed to a topic in the Google Groups "Tinode General" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tinode/eZ_9HXVmnPs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tinode+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tinode/bcbdff2f-f9a6-43e5-9b43-24215bc5c81dn%40googlegroups.com.
There is this post https://groups.google.com/g/tinode/c/zMor7odNf6k . You haven't implemented edits in the sdk then, but now they are and the problem from there can happen with your implementation if you are going to implement a search function like Skype or Facebook Messenger has where the user would jump around the messages list. Like the origininal message is in the group you request but it's edits are not, so the user won't see the edits but the original.