nftychat-universe 1.4.8 → 1.4.9

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.cjs.js CHANGED
@@ -12413,6 +12413,7 @@ function formatDmMessage(message) {
12413
12413
  }
12414
12414
 
12415
12415
  function InboxButton({
12416
+ getConversations,
12416
12417
  showRecentMessages,
12417
12418
  setShowRecentMessages,
12418
12419
  inboxNotEmpty
@@ -12420,7 +12421,10 @@ function InboxButton({
12420
12421
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
12421
12422
  children: /*#__PURE__*/jsxRuntime.jsxs("button", {
12422
12423
  className: `universal_dm__inbox ${showRecentMessages ? "universal_dm__inbox__selected" : ""}`,
12423
- onClick: () => setShowRecentMessages(!showRecentMessages),
12424
+ onClick: () => {
12425
+ getConversations();
12426
+ setShowRecentMessages(!showRecentMessages);
12427
+ },
12424
12428
  children: [/*#__PURE__*/jsxRuntime.jsx(Icon, {
12425
12429
  className: "universal_dm__inbox_icon",
12426
12430
  icon: "bi:inbox"
@@ -12513,7 +12517,8 @@ function DmButton(props) {
12513
12517
  }).then(data => {
12514
12518
  setNumberOfNotifications(data);
12515
12519
  });
12516
- }, [props.address]);
12520
+ }, [props.address]); // inbox unread message badge
12521
+
12517
12522
  React.useEffect(() => {
12518
12523
  if (["", undefined, null].includes(wagmiAddress)) return;
12519
12524
  fetch(mainUrl + "/v1/unread_message_count?address=" + wagmiAddress, {
@@ -12704,6 +12709,7 @@ function DmButton(props) {
12704
12709
  className: "universal_dm__title",
12705
12710
  children: " Recent Messages "
12706
12711
  }), /*#__PURE__*/jsxRuntime.jsx(InboxButton, {
12712
+ getConversations: getConversations,
12707
12713
  showRecentMessages: showRecentMessages,
12708
12714
  setShowRecentMessages: setShowRecentMessages,
12709
12715
  inboxNotEmpty: inboxNotEmpty
package/dist/index.esm.js CHANGED
@@ -12386,6 +12386,7 @@ function formatDmMessage(message) {
12386
12386
  }
12387
12387
 
12388
12388
  function InboxButton({
12389
+ getConversations,
12389
12390
  showRecentMessages,
12390
12391
  setShowRecentMessages,
12391
12392
  inboxNotEmpty
@@ -12393,7 +12394,10 @@ function InboxButton({
12393
12394
  return /*#__PURE__*/jsx(Fragment$1, {
12394
12395
  children: /*#__PURE__*/jsxs("button", {
12395
12396
  className: `universal_dm__inbox ${showRecentMessages ? "universal_dm__inbox__selected" : ""}`,
12396
- onClick: () => setShowRecentMessages(!showRecentMessages),
12397
+ onClick: () => {
12398
+ getConversations();
12399
+ setShowRecentMessages(!showRecentMessages);
12400
+ },
12397
12401
  children: [/*#__PURE__*/jsx(Icon, {
12398
12402
  className: "universal_dm__inbox_icon",
12399
12403
  icon: "bi:inbox"
@@ -12486,7 +12490,8 @@ function DmButton(props) {
12486
12490
  }).then(data => {
12487
12491
  setNumberOfNotifications(data);
12488
12492
  });
12489
- }, [props.address]);
12493
+ }, [props.address]); // inbox unread message badge
12494
+
12490
12495
  useEffect(() => {
12491
12496
  if (["", undefined, null].includes(wagmiAddress)) return;
12492
12497
  fetch(mainUrl + "/v1/unread_message_count?address=" + wagmiAddress, {
@@ -12677,6 +12682,7 @@ function DmButton(props) {
12677
12682
  className: "universal_dm__title",
12678
12683
  children: " Recent Messages "
12679
12684
  }), /*#__PURE__*/jsx(InboxButton, {
12685
+ getConversations: getConversations,
12680
12686
  showRecentMessages: showRecentMessages,
12681
12687
  setShowRecentMessages: setShowRecentMessages,
12682
12688
  inboxNotEmpty: inboxNotEmpty
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/nftychat/nftychat-universe"
6
6
  },
7
- "version": "1.4.8",
7
+ "version": "1.4.9",
8
8
  "license": "MIT",
9
9
  "description": "nftychat plugins for your website",
10
10
  "author": "nftychat",