Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

handle message deduplication #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

lbaker2
Copy link

@lbaker2 lbaker2 commented Jun 7, 2023

While working with the chat components on react native, we've run into some instances where published messages are duplicated in the message lists while messages are being fetched. A snippet of our RN code and a screenshot are below.

import { Chat, MessageList } from '@pubnub/react-native-chat-components'

<View style={styles.channel}>
  <Chat
    currentChannel={currentChannel}
    retryOptions={pubnubChannelRetryOptions}
    onError={onErrorSendingMessage}
    users={currentChannelUsers}
  >
    <MessageList
      fetchMessages={25}
      messageRenderer={ChatBubble}
      style={{
        messageList: styles.messageList,
        messageListScroller: styles.messageListScroller,
        message: styles.message,
      }}
    />
  {/* ... code for our input component */}
  </Chat>
</View>

IMG_074F72CB67F0-1

…shed messages while fetching messages is in flight
@netlify
Copy link

netlify bot commented Jun 7, 2023

Deploy Preview for react-chat-components ready!

Name Link
🔨 Latest commit 983b0cd
🔍 Latest deploy log https://app.netlify.com/sites/react-chat-components/deploys/6480a5396fe8750008a9e2f8
😎 Deploy Preview https://deploy-preview-119--react-chat-components.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

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

Successfully merging this pull request may close these issues.

2 participants