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

[ISSUE] getPinnedMessages also returns un-pinned messages #183

Open
clempar opened this issue Jun 14, 2018 · 0 comments
Open

[ISSUE] getPinnedMessages also returns un-pinned messages #183

clempar opened this issue Jun 14, 2018 · 0 comments

Comments

@clempar
Copy link

clempar commented Jun 14, 2018

On native Android Rocket.Chat versions, there is an issue: in "pinned" message list I can see all previously pinned message, even if they were un-pinned a long time ago.

Client version: 2.3.2 build 2026
Server version: 0.65.1 available on docker hub (database update: 121)

Steps to reproduce:

  • type a message, mark it "pinned" on the web interface
  • unpin it on the web interface
  • go to the pinned message list on the Android app
    Expected: the message no longer appears "pinned" on the web interface and on the Android app
    Actually: the message no longer appears "pinned" on the web interface but is still pinned in the Android app. And so are messages un-pinned months ago.

I believe the issue is that RocketChatClient.getPinnedMessages returns all pinned messages, regardless if they were unpinned or not at some point.

It looks like this condition might not be enough:
https://github.com/RocketChat/Rocket.Chat.Kotlin.SDK/blob/master/core/src/main/kotlin/chat/rocket/core/internal/rest/ChatRoom.kt#L110
compared to what the web app uses:
https://github.com/RocketChat/Rocket.Chat/blob/master/packages/rocketchat-lib/server/models/Messages.js#L246

What do you think ? Could you update the Kotlin SDK to match the web app behavior ?

Thanks for the good work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant