@diffsome/react 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2908,11 +2908,12 @@ var ChatBubble = ({
2908
2908
  if (seenMessageIds.current.has(msg.id)) {
2909
2909
  return;
2910
2910
  }
2911
+ if (msg.sender_type === "visitor") {
2912
+ return;
2913
+ }
2911
2914
  seenMessageIds.current.add(msg.id);
2912
2915
  setMessages((prev) => [...prev, msg]);
2913
- if (msg.sender_type !== "visitor") {
2914
- setUnreadCount((c) => c + 1);
2915
- }
2916
+ setUnreadCount((c) => c + 1);
2916
2917
  });
2917
2918
  conn.onTyping((senderType) => {
2918
2919
  if (senderType === "agent") {
package/dist/index.mjs CHANGED
@@ -2816,11 +2816,12 @@ var ChatBubble = ({
2816
2816
  if (seenMessageIds.current.has(msg.id)) {
2817
2817
  return;
2818
2818
  }
2819
+ if (msg.sender_type === "visitor") {
2820
+ return;
2821
+ }
2819
2822
  seenMessageIds.current.add(msg.id);
2820
2823
  setMessages((prev) => [...prev, msg]);
2821
- if (msg.sender_type !== "visitor") {
2822
- setUnreadCount((c) => c + 1);
2823
- }
2824
+ setUnreadCount((c) => c + 1);
2824
2825
  });
2825
2826
  conn.onTyping((senderType) => {
2826
2827
  if (senderType === "agent") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diffsome/react",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "React hooks and providers for Diffsome SDK - Headless e-commerce & CMS",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",