Skip to content

bug: duplicate pined messages in useChannelStateContext #2716

Open
@vihan85

Description

@vihan85

Describe the bug

Sometimes duplicate data is pinnedMessages in the useChannelStateContext hook,
It is resolved upon reload.

Issue 2: The pinnedMessages list is not in the order by pined_at (lastes ) of more than 10 messages

const { pinnedMessages } = useChannelStateContext();

To Reproduce

Steps to reproduce the behavior:

Go to channlner and run

import { useChannelStateContext } from 'stream-chat-react';

  const { pinnedMessages } = useChannelStateContext();
  console.log('pinnedMessages', pinnedMessages);

Expected behavior

I hope the data will not be duplicated.

Screenshots
https://drive.google.com/drive/folders/1NzdxPbbTLNyV0dozGSQ4HWWmiVwHKEOg

Image

Package version

  • stream-chat-react:12.13.1
  • stream-chat-css:5.7.2
  • stream-chat-js:8.57.6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions