Skip to content
This repository has been archived by the owner on Jun 7, 2020. It is now read-only.

[BUG] Visible all deleted/cleaned messages in channels #2208

Open
avs-ru opened this issue Sep 25, 2018 · 9 comments · May be fixed by #2617
Open

[BUG] Visible all deleted/cleaned messages in channels #2208

avs-ru opened this issue Sep 25, 2018 · 9 comments · May be fixed by #2617
Labels

Comments

@avs-ru
Copy link

avs-ru commented Sep 25, 2018

  • Your Rocket.Chat app version: 3.1.1(214)
  • Your Rocket.Chat server version: 0.69.2
  • Device (or Simulator) you're running with: iPhone ios 10.2.1

After admin cleaning old messages in channel on desktop via browser (not standalone client, maybe same), or delete message from some user in channel users on mobleclient can see all cleaned/deleted messages.

Looked in DB for default channel "GANERAL":

db.getCollection('rocketchat_message').find({rid:"GENERAL"})
Fetched 0 record(s) in 7ms

Looks like all messages is cached on mobile, and no option for refresh (pulling down as example like in other messagers).
bug-desktop
bug-ios

After some tests: logout, then login again = correctly view (not showing deleted/cleaned messages)

@rafaelks rafaelks changed the title Visible all deleted/cleaned messages in channels [BUG] Visible all deleted/cleaned messages in channels Sep 25, 2018
@rafaelks
Copy link
Contributor

This issue is blocked because there's no way to get deleted messages via API.

@avs-ru
Copy link
Author

avs-ru commented Sep 25, 2018

@rafaelks But I don't need 'deleted' messages! I need only view messages are actually in channel.

Steps to reproduce:
1/ In channel lots of messages
2/ user go to channel on iOS client and read all of them.
3/ admin clear the channel via 'Purge' option or delete random messages manually

Result:

  • in DB no messages.
  • on desktop client user got empty channel.
  • on iOS client all previously viewed messages by user in place. Only logoff/logon to server helped to get empty channel.

@avs-ru
Copy link
Author

avs-ru commented Sep 25, 2018

As I think (as not programmer) - there is no "refresh" action doing when go to previously viewed channel, only getting new messages without refresh (but if message was edited - all O.K., all correct).

@rafaelks
Copy link
Contributor

@avs-ru There's currently no way to for the mobile apps get what messages got deleted. Can you show me the option you are using to clear the messages?

@avs-ru
Copy link
Author

avs-ru commented Sep 25, 2018

@avs-ru There's currently no way to for the mobile apps get what messages got deleted. Can you show me the option you are using to clear the messages?

Sorry this internal server :(.
But I make some screens!

So, in empty channel "general"(in this example) typed two messages:
bug-desktop1
Then as another user (but i think login by different user not important) go to this channel on mobile
bug-ios1

Next purge all messages from channel:
bug-desktop2
bug-desktop3
... and typed new message "Test3 afer prune"
bug-desktop4

On mobile go to previously viewed chanel "general", and got this:
bug-ios2

@rafaelks
Copy link
Contributor

@avs-ru Great, thanks!

@danielslyman
Copy link

+1
I really need this without logging out and in again

@rafaelks
Copy link
Contributor

To update you guys on this thread: we recently shipped an API that will allow the mobile apps to support this. In near future you'll see this change in the mobile apps, please keep an eye on this issue. Thanks!

@luismachado
Copy link
Contributor

luismachado commented Mar 28, 2019

@rafaelks any updates on this?

I checked the latest heroku build (0.74.3) and issue persists.
However, on open.chat.rocket I already see a Message removed in place of the deleted messages (the behaviour is a bit buggy though, as it only refreshes by closing and opening the channel).

I know this is mostly a server issue so, by any chance, could you redirect me to the PR that introduced this behaviour? Thanks.

EDIT: since writing this I found out that the "Message removed" is tied to an admin config where you can "show the deleted status" (where the messages aren't in fact deleted but it's status changes to rm). However my main question still holds: is there already a way to correctly sync with the server and eliminate the deleted messages? Thanks!

@luismachado luismachado linked a pull request Mar 29, 2019 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants