Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

own_capabilities extraData missing after update #1047

Closed
xsahil03x opened this issue Mar 30, 2022 Discussed in #1045 · 4 comments · Fixed by #1049
Closed

own_capabilities extraData missing after update #1047

xsahil03x opened this issue Mar 30, 2022 Discussed in #1045 · 4 comments · Fixed by #1049

Comments

@xsahil03x
Copy link
Member

Discussed in #1045

Originally posted by Brazol March 30, 2022
I'm watching channel.extraDataStream and printing its content and it looks like after calling channel.updateName I get a new value in the stream (as expected) but without own-capabilities. Is this expected behaviour?

And that is the state in which the channel is then cached and from now on when checking permissions there are none.

@xsahil03x
Copy link
Member Author

@Brazol can you share a small snippet using which we can reproduce this? Thanks

@Brazol
Copy link
Contributor

Brazol commented Mar 30, 2022

I'm using hooks so it will be easiest for me to share it that way, but basicaly I just listen to extraData:
final extraData = useStream(channel.extraDataStream, initialData: channel.extraData);

and when I get new data I print it:
useEffect(() { print(extraData.data); }, [extraData.data]);

and initially I get correct json with own_capabilities array of permissions but after calling
channel.updateName
there is no own_capabilities (extraData only contains new name)

@xsahil03x
Copy link
Member Author

@Brazol Thanks, I was able to reproduce the issue. We will release a fix soon.

@Brazol
Copy link
Contributor

Brazol commented Mar 31, 2022

thanks, @xsahil03x, now that I upgraded to 4.0.0-beta I also notice it sometimes that ownCapabilietes property is empty after update to the channel. Is it connected and will your fix also fix 4.0.0-beta?

Edit: also membersStream is returning empty data after channel.updateName is called

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants