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

Fix embed codes for anonymous users or non-owners #5623

Merged
merged 1 commit into from
Aug 10, 2022

Conversation

brianpeiris
Copy link
Contributor

@brianpeiris brianpeiris commented Jul 28, 2022

If a user is not signed in and they create a room, we store the embed token for the room in the local store. We had some code that retrieved it from the store, but that code wasn't actually in use. This resulted in the embed token being null in the embed code.

Additionally, if a user is not an owner of a room, they will not have an embed token for the room, by design. In those cases, we should hide the embed code UI altogether.

Fixes #5622 Fixes #3570

@@ -556,8 +547,7 @@ function handleHubChannelJoined(entryManager, hubChannel, messageDispatch, data,
onMediaSearchResultEntrySelected: (entry, selectAction) =>
scene.emit("action_selected_media_result_entry", { entry, selectAction }),
onMediaSearchCancelled: entry => scene.emit("action_media_search_cancelled", entry),
onAvatarSaved: entry => scene.emit("action_avatar_saved", entry),
embedToken: embedToken
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The embedToken prop was a remnant from older an UI design. It is no longer used in UIRoot.

@nickgrato nickgrato requested a review from netpro2k August 3, 2022 16:43
Copy link
Contributor

@bryanenders bryanenders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brianpeiris brianpeiris merged commit 1770b55 into master Aug 10, 2022
@brianpeiris brianpeiris deleted the bug/fix-embed-token branch August 10, 2022 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants