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

farrah/75506/fixed TrackJS error: Command received no ack #6544

Merged
merged 2 commits into from
Sep 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const ChatMessages = observer(() => {
if (sendbird_store.chat_messages.length > 0 && scroll_ref.current) {
// Scroll all the way to the bottom of the container.
scroll_ref.current.scrollTop = scroll_ref.current.scrollHeight;
sendbird_store.markMessagesAsRead();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this duplicate call since we are already handling this on scroll of chat container.

}
}, [sendbird_store.chat_messages.length]); // eslint-disable-line react-hooks/exhaustive-deps

Expand Down
2 changes: 1 addition & 1 deletion packages/p2p/src/stores/sendbird-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export default class SendbirdStore extends BaseStore {
} else {
this.markMessagesAsRead(true);
}
}, 500);
}, 1000);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per SendBird documentation, markAsRead method has rate limit of one request per second. If it exceeds, SendBirdException will be thrown.

}

onReadReceiptUpdated(channel) {
Expand Down