-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: install invite flow #497
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
vojtechsimetka
approved these changes
Nov 23, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All tested, works good.
src/lib/adapters/waku/index.ts
Outdated
chatId: string, | ||
message: WithMeta<InstallMessage>, | ||
) { | ||
console.debug({ publicKey, message }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove
Suggested change
console.debug({ publicKey, message }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements the invite flow for installing objects in a chat. It works in private chats and group chats. Only not preinstalled objects can be invited to install. Preinstalled objects (that are part of the app) will simply create an instance, but this may break if the other party does not have the same set of preinstalled objects. Because of this the best would be to not have preinstalled objects at all, but instead have downloadable objects installed as part of the app, therefore they can be shared as well.
There is also the waku object list implemented which can be accessed from the Identity page.
Known issues:
command
to theInstallMessage
type) and it should reset the state for the inviter (but only in private chat, not in group).chat
apps orstandalone
apps and thegetObjectSpec
function expects this to be specified before downloading the metadata. This is not correct because most apps may have both and this should be handled differently (by checking theclass
property of the element namedapp
ordocument.getElementById('app').getAttribute('class')
). Because of this currently onlychat
apps are supported.Instructions for testing:
Identity
-Waku Objects
, paste this link in theObject path
and pressAdd object
:url:https://unpkg.com/@waku-objects/[email protected]/object
Sandbox example
. Please note that this does not have an asterisk* after the name, this indicates that it is downloadable.+
to add a new object. Choose the one without the asterisk* and pressSend invite
Accept
the invite