@corva/chat-core 0.1.10 → 0.1.11

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
@@ -3818,9 +3818,8 @@ var assetStore = createStore()((set, get) => ({
3818
3818
  }
3819
3819
  }
3820
3820
  },
3821
+ // Clears the asset only: the open room stays, even when it is this asset's chat.
3821
3822
  clearAssetContext: () => {
3822
- const previousAssetChatId = get().assetChatId;
3823
- const currentUser = authStore.getState().user;
3824
3823
  set({
3825
3824
  currentAssetId: null,
3826
3825
  currentAssetType: null,
@@ -3832,12 +3831,6 @@ var assetStore = createStore()((set, get) => ({
3832
3831
  assetChatError: null,
3833
3832
  joinRequired: null
3834
3833
  });
3835
- if (currentUser && previousAssetChatId && roomStore.getState().currentRoom?._id === previousAssetChatId) {
3836
- const generalChat = findGeneralRoom(roomStore.getState().subscriptions);
3837
- if (generalChat) {
3838
- roomStore.getState().selectRoom(generalChat.rid ?? generalChat._id);
3839
- }
3840
- }
3841
3834
  },
3842
3835
  joinAssetChat: async () => {
3843
3836
  const { joinRequired } = get();