Skip to content

Commit 5c4e9ef

Browse files
fix: add missing own_capabilities field after channel.updated event
1 parent 329c95f commit 5c4e9ef

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

package/src/components/ChannelList/hooks/listeners/useChannelUpdated.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,14 @@ export const useChannelUpdated = <
3333
(channel) => channel.cid === (event.cid || event.channel?.cid),
3434
);
3535
if (index >= 0 && event.channel) {
36-
channels[index].data = event.channel;
36+
channels[index].data = {
37+
...event.channel,
38+
hidden: event.channel?.hidden ?? channels[index].data?.hidden,
39+
own_capabilities:
40+
event.channel?.own_capabilities ?? channels[index].data?.own_capabilities,
41+
};
3742
}
43+
3844
return [...channels];
3945
});
4046
}

0 commit comments

Comments
 (0)