Skip to content

feat: add email subscription - #1081

Open
wa0x6e wants to merge 14 commits into
masterfrom
feat-ad-email-subscriptions-to-user
Open

wa0x6e wants to merge 14 commits into
masterfrom
feat-ad-email-subscriptions-to-user

Conversation

@wa0x6e

@wa0x6e wa0x6e commented Oct 27, 2024 •

Copy link
Copy Markdown
Contributor

Toward https://github.com/snapshot-labs/workflow/issues/226
Following snapshot-labs/snapshot-hub#951

This PR will add a new subscription/unsubscription features

  • subscription will allow adding a new subscription when passing an email, and updating an existing subscription when just passing a metadata
  • delete-subscription will allow deleting an existing subscription

By merging the write function from envelop (https://github.com/snapshot-labs/envelop/?tab=readme-ov-file#subscribe-to-the-mailing-list) into snapshot.js, then sequencer, we can leverage the signature and alias feature of sequencer, and will not require an extra handling of transaction signature.

How to tests

See snapshot-labs/snapshot-sequencer#470

@wa0x6e wa0x6e changed the title feat: add-email-subscription-to-profile feat: add email subscription to profile Oct 27, 2024
@wa0x6e
wa0x6e marked this pull request as ready for review October 27, 2024 21:46
@wa0x6e
wa0x6e requested a review from ChaituVR October 27, 2024 21:47
Comment thread src/schemas/profile.json Outdated
Comment thread src/schemas/profile.json Outdated
Comment thread test/examples/profile-addEmailSubscription.json Outdated
@wa0x6e wa0x6e changed the title feat: add email subscription to profile feat: add email subscription Nov 4, 2024
Comment thread src/schemas/profile.json Outdated
@wa0x6e
wa0x6e force-pushed the feat-ad-email-subscriptions-to-user branch from 37c15f3 to 071172e Compare November 12, 2024 11:27
@wa0x6e wa0x6e changed the title feat: add email subscription feat: add email subscription/unsubscription Nov 12, 2024
Comment thread scripts/generateHashWithTypes.ts
@wa0x6e
wa0x6e marked this pull request as draft November 15, 2024 00:17
@wa0x6e
wa0x6e marked this pull request as ready for review November 16, 2024 08:16
@wa0x6e
wa0x6e requested a review from ChaituVR November 18, 2024 04:09
@wa0x6e

wa0x6e commented Nov 21, 2024

Copy link
Copy Markdown
Contributor Author

I am thinking that maybe, we should not use a generic subscription name, and directly use email-subscription, to avoid confusion with the existing subscription type returned by the hub.

@ChaituVR

Copy link
Copy Markdown
Member

I am thinking that maybe, we should not use a generic subscription name, and directly use email-subscription, to avoid confusion with the existing subscription type returned by the hub.

agree

@wa0x6e wa0x6e changed the title feat: add email subscription/unsubscription feat: add email subscription Nov 23, 2024
Comment thread test/schema.spec.ts
import proposalTurbo from './examples/proposal-turbo.json';
import vote from './examples/vote.json';
import profile from './examples/profile.json';
import subscription from './examples/subscription.json';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i think we should rename this file also to avoid confusions

Comment on lines +2 to +4
"type": "email",
"value": "my-email@snapshot.org",
"metadata": "['summary', 'newProposal']"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

not sure what this file is for 🤔

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.

2 participants