@liveblocks/react 3.21.0-exp9 → 3.21.0-private2
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/_private.cjs +7 -7
- package/dist/_private.d.cts +2 -2
- package/dist/_private.d.ts +2 -2
- package/dist/_private.js +1 -1
- package/dist/{chunk-FYYTV2LI.js → chunk-4W555EA4.js} +70 -18
- package/dist/chunk-4W555EA4.js.map +1 -0
- package/dist/{chunk-LERP7BXQ.cjs → chunk-K73KKSIG.cjs} +83 -31
- package/dist/chunk-K73KKSIG.cjs.map +1 -0
- package/dist/{chunk-F264VH6K.cjs → chunk-OJVNHN7I.cjs} +2 -2
- package/dist/chunk-OJVNHN7I.cjs.map +1 -0
- package/dist/{chunk-D4HKLRQT.js → chunk-XJISWPDJ.js} +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{room-B51WdzoQ.d.cts → room-gISRc7sm.d.cts} +6 -1
- package/dist/{room-B51WdzoQ.d.ts → room-gISRc7sm.d.ts} +6 -1
- package/dist/suspense.cjs +4 -4
- package/dist/suspense.d.cts +1 -1
- package/dist/suspense.d.ts +1 -1
- package/dist/suspense.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-F264VH6K.cjs.map +0 -1
- package/dist/chunk-FYYTV2LI.js.map +0 -1
- package/dist/chunk-LERP7BXQ.cjs.map +0 -1
- /package/dist/{chunk-D4HKLRQT.js.map → chunk-XJISWPDJ.js.map} +0 -0
package/dist/_private.cjs
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkK73KKSIGcjs = require('./chunk-K73KKSIG.cjs');
|
|
33
33
|
|
|
34
34
|
// src/lib/use-layout-effect.ts
|
|
35
35
|
var _react = require('react');
|
|
@@ -54,7 +54,7 @@ function selectorFor_useGroup(state) {
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
function useGroup(groupId) {
|
|
57
|
-
const client =
|
|
57
|
+
const client = _chunkK73KKSIGcjs.useClient.call(void 0, );
|
|
58
58
|
const store = client[_core.kInternal].httpClient.groupsStore;
|
|
59
59
|
const getGroupState = _react.useCallback.call(void 0,
|
|
60
60
|
() => store.getItemState(groupId),
|
|
@@ -63,7 +63,7 @@ function useGroup(groupId) {
|
|
|
63
63
|
_react.useEffect.call(void 0, () => {
|
|
64
64
|
void store.enqueue(groupId);
|
|
65
65
|
}, [store, groupId]);
|
|
66
|
-
return
|
|
66
|
+
return _chunkK73KKSIGcjs.useSyncExternalStoreWithSelector.call(void 0,
|
|
67
67
|
store.subscribe,
|
|
68
68
|
getGroupState,
|
|
69
69
|
getGroupState,
|
|
@@ -84,8 +84,8 @@ function normalizeMentionSuggestions(suggestions) {
|
|
|
84
84
|
function useMentionSuggestions(roomId, search) {
|
|
85
85
|
const [mentionSuggestions, setMentionSuggestions] = _react.useState.call(void 0, );
|
|
86
86
|
const lastInvokedAt = _react.useRef.call(void 0, );
|
|
87
|
-
const resolveMentionSuggestions =
|
|
88
|
-
const mentionSuggestionsCache =
|
|
87
|
+
const resolveMentionSuggestions = _chunkK73KKSIGcjs.useResolveMentionSuggestions.call(void 0, );
|
|
88
|
+
const mentionSuggestionsCache = _chunkK73KKSIGcjs.useMentionSuggestionsCache.call(void 0, );
|
|
89
89
|
_react.useEffect.call(void 0, () => {
|
|
90
90
|
if (search === void 0 || !resolveMentionSuggestions) {
|
|
91
91
|
return;
|
|
@@ -140,7 +140,7 @@ function useMentionSuggestions(roomId, search) {
|
|
|
140
140
|
|
|
141
141
|
|
|
142
142
|
function useSyncSource() {
|
|
143
|
-
const client =
|
|
143
|
+
const client = _chunkK73KKSIGcjs.useClient.call(void 0, );
|
|
144
144
|
const createSyncSource = client[_core.kInternal].createSyncSource;
|
|
145
145
|
const [syncSource, setSyncSource] = _react.useState.call(void 0, );
|
|
146
146
|
_react.useEffect.call(void 0, () => {
|
|
@@ -184,5 +184,5 @@ function useSyncSource() {
|
|
|
184
184
|
|
|
185
185
|
|
|
186
186
|
|
|
187
|
-
exports.getUmbrellaStoreForClient =
|
|
187
|
+
exports.getUmbrellaStoreForClient = _chunkK73KKSIGcjs.getUmbrellaStoreForClient; exports.useAddRoomCommentReaction = _chunkK73KKSIGcjs.useAddRoomCommentReaction; exports.useClientOrNull = _chunkK73KKSIGcjs.useClientOrNull; exports.useCreateRoomComment = _chunkK73KKSIGcjs.useCreateRoomComment; exports.useCreateRoomThread = _chunkK73KKSIGcjs.useCreateRoomThread; exports.useCreateTextMention = _chunkK73KKSIGcjs.useCreateTextMention; exports.useDeleteRoomComment = _chunkK73KKSIGcjs.useDeleteRoomComment; exports.useDeleteRoomThread = _chunkK73KKSIGcjs.useDeleteRoomThread; exports.useDeleteTextMention = _chunkK73KKSIGcjs.useDeleteTextMention; exports.useEditRoomComment = _chunkK73KKSIGcjs.useEditRoomComment; exports.useEditRoomThreadMetadata = _chunkK73KKSIGcjs.useEditRoomThreadMetadata; exports.useGroup = useGroup; exports.useHasPermissionAccess = _chunkK73KKSIGcjs.useHasPermissionAccess; exports.useInitial = _chunkK73KKSIGcjs.useInitial; exports.useLatest = _chunkK73KKSIGcjs.useLatest; exports.useLayoutEffect = useLayoutEffect; exports.useMarkRoomThreadAsRead = _chunkK73KKSIGcjs.useMarkRoomThreadAsRead; exports.useMarkRoomThreadAsResolved = _chunkK73KKSIGcjs.useMarkRoomThreadAsResolved; exports.useMarkRoomThreadAsUnresolved = _chunkK73KKSIGcjs.useMarkRoomThreadAsUnresolved; exports.useMentionSuggestions = useMentionSuggestions; exports.useMentionSuggestionsCache = _chunkK73KKSIGcjs.useMentionSuggestionsCache; exports.useRemoveRoomCommentReaction = _chunkK73KKSIGcjs.useRemoveRoomCommentReaction; exports.useReportTextEditor = _chunkK73KKSIGcjs.useReportTextEditor; exports.useResolveMentionSuggestions = _chunkK73KKSIGcjs.useResolveMentionSuggestions; exports.useRoomAttachmentUrl = _chunkK73KKSIGcjs.useRoomAttachmentUrl; exports.useRoomPermissions = _chunkK73KKSIGcjs.useRoomPermissions; exports.useRoomThreadSubscription = _chunkK73KKSIGcjs.useRoomThreadSubscription; exports.useSignal = _chunkK73KKSIGcjs.useSignal; exports.useSuspendUntilPresenceReady = _chunkK73KKSIGcjs.useSuspendUntilPresenceReady; exports.useSuspendUntilStorageReady = _chunkK73KKSIGcjs.useSuspendUntilStorageReady; exports.useSyncExternalStoreWithSelector = _chunkK73KKSIGcjs.useSyncExternalStoreWithSelector; exports.useSyncSource = useSyncSource; exports.useYjsProvider = _chunkK73KKSIGcjs.useYjsProvider;
|
|
188
188
|
//# sourceMappingURL=_private.cjs.map
|
package/dist/_private.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as GroupAsyncResult } from './room-
|
|
2
|
-
export { g as getUmbrellaStoreForClient, u as useAddRoomCommentReaction, a as useClientOrNull, b as useCreateRoomComment, c as useCreateRoomThread, d as useCreateTextMention, e as useDeleteRoomComment, f as useDeleteRoomThread, h as useDeleteTextMention, i as useEditRoomComment, j as useEditRoomThreadMetadata, k as useHasPermissionAccess, l as useMarkRoomThreadAsRead, m as useMarkRoomThreadAsResolved, n as useMarkRoomThreadAsUnresolved, o as useMentionSuggestionsCache, p as useRemoveRoomCommentReaction, q as useReportTextEditor, r as useResolveMentionSuggestions, s as useRoomAttachmentUrl, t as useRoomPermissions, v as useRoomThreadSubscription, w as useSuspendUntilPresenceReady, x as useSuspendUntilStorageReady, y as useYjsProvider } from './room-
|
|
1
|
+
import { G as GroupAsyncResult } from './room-gISRc7sm.cjs';
|
|
2
|
+
export { g as getUmbrellaStoreForClient, u as useAddRoomCommentReaction, a as useClientOrNull, b as useCreateRoomComment, c as useCreateRoomThread, d as useCreateTextMention, e as useDeleteRoomComment, f as useDeleteRoomThread, h as useDeleteTextMention, i as useEditRoomComment, j as useEditRoomThreadMetadata, k as useHasPermissionAccess, l as useMarkRoomThreadAsRead, m as useMarkRoomThreadAsResolved, n as useMarkRoomThreadAsUnresolved, o as useMentionSuggestionsCache, p as useRemoveRoomCommentReaction, q as useReportTextEditor, r as useResolveMentionSuggestions, s as useRoomAttachmentUrl, t as useRoomPermissions, v as useRoomThreadSubscription, w as useSuspendUntilPresenceReady, x as useSuspendUntilStorageReady, y as useYjsProvider } from './room-gISRc7sm.cjs';
|
|
3
3
|
import { MutableRefObject, useEffect } from 'react';
|
|
4
4
|
import { MentionData, ISignal, SyncSource } from '@liveblocks/core';
|
|
5
5
|
import '@liveblocks/client';
|
package/dist/_private.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as GroupAsyncResult } from './room-
|
|
2
|
-
export { g as getUmbrellaStoreForClient, u as useAddRoomCommentReaction, a as useClientOrNull, b as useCreateRoomComment, c as useCreateRoomThread, d as useCreateTextMention, e as useDeleteRoomComment, f as useDeleteRoomThread, h as useDeleteTextMention, i as useEditRoomComment, j as useEditRoomThreadMetadata, k as useHasPermissionAccess, l as useMarkRoomThreadAsRead, m as useMarkRoomThreadAsResolved, n as useMarkRoomThreadAsUnresolved, o as useMentionSuggestionsCache, p as useRemoveRoomCommentReaction, q as useReportTextEditor, r as useResolveMentionSuggestions, s as useRoomAttachmentUrl, t as useRoomPermissions, v as useRoomThreadSubscription, w as useSuspendUntilPresenceReady, x as useSuspendUntilStorageReady, y as useYjsProvider } from './room-
|
|
1
|
+
import { G as GroupAsyncResult } from './room-gISRc7sm.js';
|
|
2
|
+
export { g as getUmbrellaStoreForClient, u as useAddRoomCommentReaction, a as useClientOrNull, b as useCreateRoomComment, c as useCreateRoomThread, d as useCreateTextMention, e as useDeleteRoomComment, f as useDeleteRoomThread, h as useDeleteTextMention, i as useEditRoomComment, j as useEditRoomThreadMetadata, k as useHasPermissionAccess, l as useMarkRoomThreadAsRead, m as useMarkRoomThreadAsResolved, n as useMarkRoomThreadAsUnresolved, o as useMentionSuggestionsCache, p as useRemoveRoomCommentReaction, q as useReportTextEditor, r as useResolveMentionSuggestions, s as useRoomAttachmentUrl, t as useRoomPermissions, v as useRoomThreadSubscription, w as useSuspendUntilPresenceReady, x as useSuspendUntilStorageReady, y as useYjsProvider } from './room-gISRc7sm.js';
|
|
3
3
|
import { MutableRefObject, useEffect } from 'react';
|
|
4
4
|
import { MentionData, ISignal, SyncSource } from '@liveblocks/core';
|
|
5
5
|
import '@liveblocks/client';
|
package/dist/_private.js
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
useSuspendUntilStorageReady,
|
|
30
30
|
useSyncExternalStoreWithSelector,
|
|
31
31
|
useYjsProvider
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-4W555EA4.js";
|
|
33
33
|
|
|
34
34
|
// src/lib/use-layout-effect.ts
|
|
35
35
|
import { useEffect, useLayoutEffect as useOriginalLayoutEffect } from "react";
|
|
@@ -338,7 +338,7 @@ function matchesThreadsQuery(thread, q, subscriptions) {
|
|
|
338
338
|
if (subscriptions) {
|
|
339
339
|
subscription = subscriptions?.[getSubscriptionKey("thread", thread.id)];
|
|
340
340
|
}
|
|
341
|
-
return (q.resolved === void 0 || thread.resolved === q.resolved) && (q.subscribed === void 0 || q.subscribed === true && subscription !== void 0 || q.subscribed === false && subscription === void 0);
|
|
341
|
+
return (q.resolved === void 0 || thread.resolved === q.resolved) && (q.visibility === void 0 || thread.visibility === q.visibility) && (q.subscribed === void 0 || q.subscribed === true && subscription !== void 0 || q.subscribed === false && subscription === void 0);
|
|
342
342
|
}
|
|
343
343
|
function matchesThreadMetadata(thread, q) {
|
|
344
344
|
const metadata = thread.metadata;
|
|
@@ -3678,6 +3678,9 @@ function getRoomExtrasForClient(client) {
|
|
|
3678
3678
|
}
|
|
3679
3679
|
return extras;
|
|
3680
3680
|
}
|
|
3681
|
+
function getThreadVisibility(store, threadId) {
|
|
3682
|
+
return store.outputs.threads.get().getEvenIfDeleted(threadId)?.visibility;
|
|
3683
|
+
}
|
|
3681
3684
|
function makeRoomExtrasForClient(client) {
|
|
3682
3685
|
const store = getUmbrellaStoreForClient(client);
|
|
3683
3686
|
function onMutationFailure(optimisticId, context, innerError) {
|
|
@@ -4528,6 +4531,7 @@ function useCreateRoomThread(roomId) {
|
|
|
4528
4531
|
const metadata = options.metadata ?? {};
|
|
4529
4532
|
const commentMetadata = options.commentMetadata ?? {};
|
|
4530
4533
|
const attachments = options.attachments;
|
|
4534
|
+
const visibility = options.visibility ?? "public";
|
|
4531
4535
|
const threadId = createThreadId();
|
|
4532
4536
|
const commentId = createCommentId();
|
|
4533
4537
|
const createdAt = /* @__PURE__ */ new Date();
|
|
@@ -4551,7 +4555,8 @@ function useCreateRoomThread(roomId) {
|
|
|
4551
4555
|
roomId,
|
|
4552
4556
|
metadata,
|
|
4553
4557
|
comments: [newComment],
|
|
4554
|
-
resolved: false
|
|
4558
|
+
resolved: false,
|
|
4559
|
+
visibility
|
|
4555
4560
|
};
|
|
4556
4561
|
const { store, onMutationFailure } = getRoomExtrasForClient(client);
|
|
4557
4562
|
const optimisticId = store.optimisticUpdates.add({
|
|
@@ -4565,6 +4570,7 @@ function useCreateRoomThread(roomId) {
|
|
|
4565
4570
|
threadId,
|
|
4566
4571
|
commentId,
|
|
4567
4572
|
body,
|
|
4573
|
+
visibility,
|
|
4568
4574
|
metadata,
|
|
4569
4575
|
commentMetadata,
|
|
4570
4576
|
attachmentIds
|
|
@@ -4580,6 +4586,7 @@ function useCreateRoomThread(roomId) {
|
|
|
4580
4586
|
threadId,
|
|
4581
4587
|
commentId,
|
|
4582
4588
|
body,
|
|
4589
|
+
visibility,
|
|
4583
4590
|
metadata,
|
|
4584
4591
|
commentMetadata
|
|
4585
4592
|
},
|
|
@@ -4613,7 +4620,11 @@ function useDeleteRoomThread(roomId) {
|
|
|
4613
4620
|
threadId,
|
|
4614
4621
|
deletedAt: /* @__PURE__ */ new Date()
|
|
4615
4622
|
});
|
|
4616
|
-
client[kInternal4].httpClient.deleteThread({
|
|
4623
|
+
client[kInternal4].httpClient.deleteThread({
|
|
4624
|
+
roomId,
|
|
4625
|
+
threadId,
|
|
4626
|
+
visibility: existing.visibility
|
|
4627
|
+
}).then(
|
|
4617
4628
|
() => {
|
|
4618
4629
|
store.deleteThread(threadId, optimisticId);
|
|
4619
4630
|
},
|
|
@@ -4650,7 +4661,12 @@ function useEditRoomThreadMetadata(roomId) {
|
|
|
4650
4661
|
threadId,
|
|
4651
4662
|
updatedAt
|
|
4652
4663
|
});
|
|
4653
|
-
client[kInternal4].httpClient.editThreadMetadata({
|
|
4664
|
+
client[kInternal4].httpClient.editThreadMetadata({
|
|
4665
|
+
roomId,
|
|
4666
|
+
threadId,
|
|
4667
|
+
metadata,
|
|
4668
|
+
visibility: getThreadVisibility(store, threadId)
|
|
4669
|
+
}).then(
|
|
4654
4670
|
(metadata2) => (
|
|
4655
4671
|
// Replace the optimistic update by the real thing
|
|
4656
4672
|
store.patchThread(threadId, optimisticId, { metadata: metadata2 }, updatedAt)
|
|
@@ -4697,7 +4713,13 @@ function useEditRoomCommentMetadata(roomId) {
|
|
|
4697
4713
|
metadata,
|
|
4698
4714
|
updatedAt
|
|
4699
4715
|
});
|
|
4700
|
-
client[kInternal4].httpClient.editCommentMetadata({
|
|
4716
|
+
client[kInternal4].httpClient.editCommentMetadata({
|
|
4717
|
+
roomId,
|
|
4718
|
+
threadId,
|
|
4719
|
+
commentId,
|
|
4720
|
+
metadata,
|
|
4721
|
+
visibility: getThreadVisibility(store, threadId)
|
|
4722
|
+
}).then(
|
|
4701
4723
|
(updatedMetadata) => (
|
|
4702
4724
|
// Replace the optimistic update by the real thing
|
|
4703
4725
|
store.editCommentMetadata(
|
|
@@ -4763,7 +4785,8 @@ function useCreateRoomComment(roomId) {
|
|
|
4763
4785
|
commentId,
|
|
4764
4786
|
body,
|
|
4765
4787
|
metadata,
|
|
4766
|
-
attachmentIds
|
|
4788
|
+
attachmentIds,
|
|
4789
|
+
visibility: getThreadVisibility(store, threadId)
|
|
4767
4790
|
}).then(
|
|
4768
4791
|
(newComment) => {
|
|
4769
4792
|
store.createComment(newComment, optimisticId);
|
|
@@ -4841,7 +4864,8 @@ function useEditRoomComment(roomId) {
|
|
|
4841
4864
|
commentId,
|
|
4842
4865
|
body,
|
|
4843
4866
|
attachmentIds,
|
|
4844
|
-
metadata
|
|
4867
|
+
metadata,
|
|
4868
|
+
visibility: existing.visibility
|
|
4845
4869
|
}).then(
|
|
4846
4870
|
(editedComment) => {
|
|
4847
4871
|
store.editComment(threadId, optimisticId, editedComment);
|
|
@@ -4882,7 +4906,12 @@ function useDeleteRoomComment(roomId) {
|
|
|
4882
4906
|
deletedAt,
|
|
4883
4907
|
roomId
|
|
4884
4908
|
});
|
|
4885
|
-
client[kInternal4].httpClient.deleteComment({
|
|
4909
|
+
client[kInternal4].httpClient.deleteComment({
|
|
4910
|
+
roomId,
|
|
4911
|
+
threadId,
|
|
4912
|
+
commentId,
|
|
4913
|
+
visibility: getThreadVisibility(store, threadId)
|
|
4914
|
+
}).then(
|
|
4886
4915
|
() => {
|
|
4887
4916
|
store.deleteComment(threadId, optimisticId, commentId, deletedAt);
|
|
4888
4917
|
},
|
|
@@ -4919,7 +4948,13 @@ function useAddRoomCommentReaction(roomId) {
|
|
|
4919
4948
|
createdAt
|
|
4920
4949
|
}
|
|
4921
4950
|
});
|
|
4922
|
-
client[kInternal4].httpClient.addReaction({
|
|
4951
|
+
client[kInternal4].httpClient.addReaction({
|
|
4952
|
+
roomId,
|
|
4953
|
+
threadId,
|
|
4954
|
+
commentId,
|
|
4955
|
+
emoji,
|
|
4956
|
+
visibility: getThreadVisibility(store, threadId)
|
|
4957
|
+
}).then(
|
|
4923
4958
|
(addedReaction) => {
|
|
4924
4959
|
store.addReaction(
|
|
4925
4960
|
threadId,
|
|
@@ -4966,7 +5001,13 @@ function useRemoveRoomCommentReaction(roomId) {
|
|
|
4966
5001
|
userId,
|
|
4967
5002
|
removedAt
|
|
4968
5003
|
});
|
|
4969
|
-
client[kInternal4].httpClient.removeReaction({
|
|
5004
|
+
client[kInternal4].httpClient.removeReaction({
|
|
5005
|
+
roomId,
|
|
5006
|
+
threadId,
|
|
5007
|
+
commentId,
|
|
5008
|
+
emoji,
|
|
5009
|
+
visibility: getThreadVisibility(store, threadId)
|
|
5010
|
+
}).then(
|
|
4970
5011
|
() => {
|
|
4971
5012
|
store.removeReaction(
|
|
4972
5013
|
threadId,
|
|
@@ -5062,7 +5103,11 @@ function useMarkRoomThreadAsResolved(roomId) {
|
|
|
5062
5103
|
threadId,
|
|
5063
5104
|
updatedAt
|
|
5064
5105
|
});
|
|
5065
|
-
client[kInternal4].httpClient.markThreadAsResolved({
|
|
5106
|
+
client[kInternal4].httpClient.markThreadAsResolved({
|
|
5107
|
+
roomId,
|
|
5108
|
+
threadId,
|
|
5109
|
+
visibility: getThreadVisibility(store, threadId)
|
|
5110
|
+
}).then(
|
|
5066
5111
|
() => {
|
|
5067
5112
|
store.patchThread(
|
|
5068
5113
|
threadId,
|
|
@@ -5098,7 +5143,11 @@ function useMarkRoomThreadAsUnresolved(roomId) {
|
|
|
5098
5143
|
threadId,
|
|
5099
5144
|
updatedAt
|
|
5100
5145
|
});
|
|
5101
|
-
client[kInternal4].httpClient.markThreadAsUnresolved({
|
|
5146
|
+
client[kInternal4].httpClient.markThreadAsUnresolved({
|
|
5147
|
+
roomId,
|
|
5148
|
+
threadId,
|
|
5149
|
+
visibility: getThreadVisibility(store, threadId)
|
|
5150
|
+
}).then(
|
|
5102
5151
|
() => {
|
|
5103
5152
|
store.patchThread(
|
|
5104
5153
|
threadId,
|
|
@@ -5605,12 +5654,15 @@ function useSelfAccessFallback(roomId, resource, requiredAccess) {
|
|
|
5605
5654
|
[room, roomId]
|
|
5606
5655
|
);
|
|
5607
5656
|
const getSnapshot = useCallback3(() => {
|
|
5608
|
-
const
|
|
5609
|
-
if (
|
|
5610
|
-
|
|
5657
|
+
const isCommentsResource = resource === "comments" || resource === "comments:public" || resource === "comments:private";
|
|
5658
|
+
if (room?.id === roomId) {
|
|
5659
|
+
const permissionMatrix = room[kInternal4].getPermissionMatrix();
|
|
5660
|
+
if (permissionMatrix !== void 0) {
|
|
5661
|
+
return hasPermissionAccess(permissionMatrix, resource, requiredAccess);
|
|
5662
|
+
}
|
|
5611
5663
|
}
|
|
5612
|
-
if (
|
|
5613
|
-
return
|
|
5664
|
+
if (requiredAccess === "write" && (isCommentsResource || resource === "storage")) {
|
|
5665
|
+
return true;
|
|
5614
5666
|
}
|
|
5615
5667
|
return false;
|
|
5616
5668
|
}, [resource, requiredAccess, room, roomId]);
|
|
@@ -6229,4 +6281,4 @@ export {
|
|
|
6229
6281
|
_useStorageRoot,
|
|
6230
6282
|
_useUpdateMyPresence
|
|
6231
6283
|
};
|
|
6232
|
-
//# sourceMappingURL=chunk-
|
|
6284
|
+
//# sourceMappingURL=chunk-4W555EA4.js.map
|