@ermis-network/ermis-chat-react 1.0.5 → 1.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ermis-network/ermis-chat-react",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "React UI components for Ermis Chat",
5
5
  "author": "Ermis",
6
6
  "homepage": "https://ermis.network/",
@@ -20,7 +20,7 @@
20
20
  "/src"
21
21
  ],
22
22
  "dependencies": {
23
- "@ermis-network/ermis-chat-sdk": "1.0.5",
23
+ "@ermis-network/ermis-chat-sdk": "1.0.6",
24
24
  "virtua": "^0.48.8"
25
25
  },
26
26
  "peerDependencies": {
@@ -245,7 +245,7 @@ const ChannelRow: React.FC<ChannelRowProps> = React.memo(({
245
245
  ChannelRow.displayName = 'ChannelRow';
246
246
 
247
247
  export const ChannelList: React.FC<ChannelListProps> = React.memo(({
248
- filters = { type: ['messaging', 'team'], include_pinned_messages: true } as unknown as ChannelFilters,
248
+ filters = { type: ['messaging', 'team', 'meeting'], include_pinned_messages: true } as unknown as ChannelFilters,
249
249
  sort = [],
250
250
  options = { message_limit: 25 } as unknown as ChannelListProps['options'],
251
251
  renderChannel,
@@ -271,7 +271,7 @@ export const ChannelList: React.FC<ChannelListProps> = React.memo(({
271
271
  const { pendingChannels, regularChannels } = useMemo<{ pendingChannels: Channel[], regularChannels: Channel[] }>(() => {
272
272
  const pending: Channel[] = [];
273
273
  const regular: Channel[] = [];
274
-
274
+
275
275
  channels.forEach(ch => {
276
276
  const ms = ch.state?.membership as Record<string, unknown> | undefined;
277
277
  const isPending = ms?.channel_role === 'pending' || ms?.role === 'pending';
@@ -317,7 +317,7 @@ export const ChannelList: React.FC<ChannelListProps> = React.memo(({
317
317
  const isBannedInChannel = Boolean(ms?.banned);
318
318
  const isBlockedInChannel = channel.type === 'messaging' && Boolean(ms?.blocked);
319
319
  const isPending = ms?.channel_role === 'pending' || ms?.role === 'pending';
320
-
320
+
321
321
  if (!isBannedInChannel && !isBlockedInChannel && !isPending && (chState?.unreadCount as number) > 0) {
322
322
  channel.markRead().catch(() => { });
323
323
  // Optimistically reset unread to update UI immediately
@@ -336,8 +336,8 @@ export const ChannelList: React.FC<ChannelListProps> = React.memo(({
336
336
  {/* VList requires its container to have a height to work. */}
337
337
  <VList style={{ height: '100%' }}>
338
338
  {pendingChannels.length > 0 && (
339
- <div
340
- className="ermis-channel-list__accordion-header"
339
+ <div
340
+ className="ermis-channel-list__accordion-header"
341
341
  onClick={() => setIsPendingExpanded(prev => !prev)}
342
342
  >
343
343
  <span>
@@ -345,9 +345,9 @@ export const ChannelList: React.FC<ChannelListProps> = React.memo(({
345
345
  ? pendingInvitesLabel(pendingChannels.length)
346
346
  : pendingInvitesLabel || `Invites (${pendingChannels.length})`}
347
347
  </span>
348
- <svg
348
+ <svg
349
349
  className={`ermis-channel-list__accordion-icon ${isPendingExpanded ? 'ermis-channel-list__accordion-icon--expanded' : ''}`}
350
- width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"
350
+ width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"
351
351
  >
352
352
  <polyline points="6 9 12 15 18 9"></polyline>
353
353
  </svg>