stream-chat-react icon indicating copy to clipboard operation
stream-chat-react copied to clipboard

bug: Pining messages no longer persist to the channel backend

Open zencephalon opened this issue 3 years ago β€’ 1 comments

Describe the bug

When using client.pinMessage to pin messages they don't show up as pinned under either

channel.getPinnedMessages

or

stream.channel('livestream', channel.id).query({})

To Reproduce

Pin a message using client.pinMessage. Elsewhere try to fetch the pinned messages.

Expected behavior

Pinned messages should show up when queried.

Package version

  • stream-chat-react:

10.2.0

  • stream-chat-js:

7.1.0

Desktop (please complete the following information):

  • OS: [e.g. iOS]

MacOS

  • Browser [e.g. chrome, safari]

Chrome

  • Version [e.g. 22]

Chromium Engine Version 106.0.5249.103

Additional context

This was working before we updated so maybe https://github.com/GetStream/stream-chat-react/pull/1784 had something to do with this?

zencephalon avatar Oct 11 '22 20:10 zencephalon

Hey, @zencephalon, this is a BE issue which is currently getting fixed. We expect the release of the fix in the upcoming days. I'll keep this open and close it once the fix is out. πŸ‘

arnautov-anton avatar Oct 13 '22 07:10 arnautov-anton

@arnautov-anton Sorry to bother! Any update on this? We have a launch deadline coming up in a few weeks so if this doesn't look like it'll get resolved I'll write my own backend to implement pinned messages.

zencephalon avatar Oct 25 '22 16:10 zencephalon

Hey, @zencephalon, no bother at all, thank you for reminding! I talked to the BE team and the issue is still being worked on, @ferhatelmas will post an update once there's a progress.

arnautov-anton avatar Oct 26 '22 10:10 arnautov-anton

bumping for an update πŸ™

shrugs avatar Feb 06 '23 05:02 shrugs

Hey, @zencephalon, sorry for the prolonged delay - I see that you use livestream type of the channel - did you update user permissions for that scope in the dashboard? Check by selecting the scope livestream and then edit user role, see if the right column has "Pin message" grant.

I did test it myself and without it obviously does not work but after adding the grant - everything works as expected. There's one issue that we know of but that's related to truncating of the channel and shouldn't affect you in any way. If the issue still persists I'd ask you to fork this sandbox and replicate the issue for us so we can proceed with the investigation.

arnautov-anton avatar Feb 09 '23 10:02 arnautov-anton

Yeah, we have the pin message grant enabled. If it looks like it works on your end, then I wager it does. I don’t have a motivation to test it anymore because we implemented our own pin message API using Redis due to the original issue not resolving in time for us to meet our deadline.

zencephalon avatar Feb 09 '23 15:02 zencephalon