Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete message on server will remain in the IOS App #856

Closed
HuguesDug opened this issue Aug 11, 2022 · 6 comments
Closed

Delete message on server will remain in the IOS App #856

HuguesDug opened this issue Aug 11, 2022 · 6 comments

Comments

@HuguesDug
Copy link

HuguesDug commented Aug 11, 2022

Steps to reproduce

  1. In a conversation, create a chat message.
  2. View it on the IOS client
  3. Close the App
  4. Delete the message on the server (from the SQL database)
  5. Reopen the App
  6. Message is still there

Expected behaviour

When reopening the app, or reopening a conversation, history of the chat messages should be updated, so deleted/modified messages on server side are removed. In the IOS version, the local cache is used and not checked against actual server data.
It works correctly on the web client and on the Android chat client. When a conversation is opened (or app relauched), the local cache is cleared and updated with current server data. A modified or deleted message appear as it should.

Actual behaviour

A none existing message is still shown, where it should not.

Device information

Device: iPhone 6

iOS version: 12

Talk version: All released until the most recent one.

Server information

Nextcloud version: 24.0.3 (but was the same on previous versions). It works on Android and web versions. It is related to startup management in the android App.

Talk version: 14.0.3

Custom Signaling server configured: not relevant,

Custom TURN server configured: yes

Custom STUN server configured: yes

Server log (data/nextcloud.log)

Not relevant
@SystemKeeper
Copy link
Collaborator

4. Delete the message on the server (from the SQL database)

Hey @HuguesDug,
just to be sure here, you're really deleting messages directly in the database and not using the delete message functionality from talk, right?
If that is the case, talk-ios behaves as intended, from my point of view. The whole point of having the messages cached locally is to not have to synchronize the whole message history again and again. If a message is deleted within talk a hidden message is sent to the devices to let them know that there is a message, that should be deleted - this is not the case when you manipulate the database.

@HuguesDug
Copy link
Author

Hello,

Yes, your remark is correct : directly removing from database without going throught the API.

Though, Android App or Web version do a resync of the cache when you open the App or open a conversation, what, in my perspective, makes fully sense. In this way, you perfectly warranty the data on the device.

Just relying on the local cache leave alive any "problem" that has occured regarding sync or processing messages.

I discovered this as I implemented a TTL on read messages with a script that runs on the my sql database.
Deleted messages goes away like a charm on WEB and Android... but not on IOS. So, behavior of the various implementation is clearly different.

@SystemKeeper
Copy link
Collaborator

So if TTL is something you want to use, there will be support for it in an upcoming version, see nextcloud/spreed#7359

There's also some discussion about lifiting the 6h limit for message deletion, you can find the discussion at
nextcloud/spreed#7134

Deleted messages goes away like a charm on WEB and Android... but not on IOS. So, behavior of the various implementation is clearly different.

Well, indeed the behavior is different, but it isn't wrong either. The web part of talk only caches messages in the current session, so reloading the page, will reload the messages. On Android there's no offline support, so there's no real caching (never used the android app, just judging from the tickets. There's offline support planned at some point, though:
nextcloud/talk-android#217).
So for your case you're relying on something that's not intended to work that way to be honest.

@HuguesDug
Copy link
Author

I fear the TTL will not suite my need. I want to delete only read messages after a period, unread can stay on the server for unlimited period of time.

As far as I could read from TTL concept, all the messages will expire after a period of time, being read of not.
Reason why I tried to work around the problem.

Any hint ?

@SystemKeeper
Copy link
Collaborator

SystemKeeper commented Aug 11, 2022

Any hint ?

Not really. What you're trying to achieve is not possible in the current implementation and I don't think that this will change (just my personal opinion). I also can see some problems: What happens if your users turn off read receipts in talk? Suddenly all messages are marked as read and will vanish?!

Without knowing the details of your use case, I still think TTL will be the closest you can get at this moment.

@SystemKeeper
Copy link
Collaborator

As discussed with @Ivansss there are no plans to change the current behaviour.

@SystemKeeper SystemKeeper closed this as not planned Won't fix, can't repro, duplicate, stale Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants