stream-chat
Advanced tools
Comparing version 8.46.0 to 8.46.1
{ | ||
"name": "stream-chat", | ||
"version": "8.46.0", | ||
"version": "8.46.1", | ||
"description": "JS SDK for the Stream Chat API", | ||
@@ -5,0 +5,0 @@ "author": "GetStream", |
@@ -1556,8 +1556,16 @@ import { ChannelState } from './channel_state'; | ||
case 'member.updated': | ||
if (event.member?.user_id) { | ||
if (event.member?.user) { | ||
channelState.members = { | ||
...channelState.members, | ||
[event.member.user_id]: event.member, | ||
[event.member.user.id]: event.member, | ||
}; | ||
} | ||
if ( | ||
typeof channelState.membership.user?.id === 'string' && | ||
typeof event.member?.user?.id === 'string' && | ||
event.member.user.id === channelState.membership.user.id | ||
) { | ||
channelState.membership = event.member; | ||
} | ||
break; | ||
@@ -1573,2 +1581,4 @@ case 'member.removed': | ||
channelState.members = newMembers; | ||
// TODO?: unset membership | ||
} | ||
@@ -1715,3 +1725,6 @@ break; | ||
this.state.membership = state.membership || {}; | ||
this.state.membership = { | ||
...this.state.membership, | ||
...state.membership, | ||
}; | ||
@@ -1718,0 +1731,0 @@ const messages = state.messages || []; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
7425365
77380