Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Disable mutiny plus profiles instead of delete#1173

Merged
AnthonyRonning merged 1 commit into
masterfrom
disable-mutiny-plus
May 9, 2024
Merged

Disable mutiny plus profiles instead of delete#1173
AnthonyRonning merged 1 commit into
masterfrom
disable-mutiny-plus

Conversation

@AnthonyRonning

Copy link
Copy Markdown
Contributor

This partially solves this problem: MutinyWallet/mutiny-web#1130

It at least lets you "disable" mutiny+ subscriptions. Nothing yet to make it enable though, but it at least doesn't charge people money that explicitly removed the old profile.

Basically we need to disable, not full remove, because we ensure that a profile exists for subscribers.

@benthecarman benthecarman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

good catch,

Comment thread mutiny-core/src/lib.rs
Comment on lines 2155 to 2162

if let Some(nwc) = nwc {
// only should have to submit the NWC if never created locally before
subscription_client.submit_nwc(nwc).await?;
}
}
Some(profile) => {
if profile.tag != NwcProfileTag::Subscription {
let mut nwc = profile.clone();
nwc.tag = NwcProfileTag::Subscription;
self.nostr.edit_nwc_profile(nwc)?;
}
if let Some(nwc) = nwc {
// only should have to submit the NWC if never created locally before
subscription_client.submit_nwc(nwc).await?;
}
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why delete this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because it's not needed. Why keep it?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We use this in the front end to mark it as a subscription so we know to not display the nwc connection string

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It should already be marked correctly

ah okay, this was for fixing old profiles, that's fine then

Comment thread mutiny-core/src/lib.rs
Comment thread mutiny-core/src/nostr/mod.rs Outdated
@AnthonyRonning AnthonyRonning force-pushed the disable-mutiny-plus branch 2 times, most recently from 98f4e2e to 7a9645f Compare May 8, 2024 23:45
@AnthonyRonning AnthonyRonning merged commit 8c127e4 into master May 9, 2024
@AnthonyRonning AnthonyRonning deleted the disable-mutiny-plus branch May 9, 2024 00:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants