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

subscribe return meta #419

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

subscribe return meta #419

wants to merge 4 commits into from

Conversation

aeroyu
Copy link

@aeroyu aeroyu commented Dec 22, 2020

No description provided.

@coveralls
Copy link

coveralls commented Dec 22, 2020

Coverage Status

Coverage increased (+0.01%) to 97.377% when pulling 99a73b1 on aeroyu:master into eadd9bc on share:master.

@alecgibson
Copy link
Collaborator

Thanks for the Pull Request @aeroyu ! This is a nice feature. I won't have time to look at this properly until the new year, but off the top of my head we'll need at least the following features to merge this:

Metadata opt-in

Getting metadata should probably be opt-in. Some consumers may not want their clients to have access to potentially secret metadata, so we should:

  • Add a feature flag to the backend, so that consumers don't accidentally start leaking data by bumping their sharedb dependency
  • Force the client to also opt-in to metadata by setting a flag on Doc, so that the client can declare whether it cares about meta or not

Reset meta

There are various cases where we unset doc.data. We should also unset the meta in these cases (search through doc.js for data = to get a rough idea). I can't remember off the top of my head, but it'll be things like creating, destroying or resetting a doc.

@aeroyu
Copy link
Author

aeroyu commented Dec 25, 2020

Thanks for the Pull Request @aeroyu ! This is a nice feature. I won't have time to look at this properly until the new year, but off the top of my head we'll need at least the following features to merge this:

Metadata opt-in

Getting metadata should probably be opt-in. Some consumers may not want their clients to have access to potentially secret metadata, so we should:

  • Add a feature flag to the backend, so that consumers don't accidentally start leaking data by bumping their sharedb dependency
  • Force the client to also opt-in to metadata by setting a flag on Doc, so that the client can declare whether it cares about meta or not

Reset meta

There are various cases where we unset doc.data. We should also unset the meta in these cases (search through doc.js for data = to get a rough idea). I can't remember off the top of my head, but it'll be things like creating, destroying or resetting a doc.

that will be great

This reverts commit 1fe9959
返回版本信息有误,本地提交需要在提交callback里获取
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 this pull request may close these issues.

4 participants