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

Do not try to re-subscribe to unsubscribed accounts #4653

Merged
merged 1 commit into from
Aug 21, 2017

Conversation

Gargron
Copy link
Member

@Gargron Gargron commented Aug 21, 2017

No description provided.

@unarist
Copy link
Contributor

unarist commented Aug 21, 2017

Okay, looks good.

Now we need to subscribe manually to recover subscription (e.g. in case of remote server had been down for half a month). I think it is reasonable, but we can consider admin tools for this at some time. For example: filter by subscription status, automatic unsubscribing logs, etc.

end

def subscription(webhook_url)
OStatus2::Subscription.new(remote_url, secret: secret, lease_seconds: 30.days.seconds, webhook: webhook_url, hub: hub_url)
@subscription ||= OStatus2::Subscription.new(remote_url, secret: secret, webhook: webhook_url, hub: hub_url)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is lease_seconds no longer needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

I removed it because it would confuse readers. The subscribe/unsubscribe methods of OStatus2::Subscription are no longer used anywhere. SubscribeService defines its own lease_seconds.

@Gargron Gargron merged commit 3534e11 into master Aug 21, 2017
@Gargron Gargron deleted the fix-resubscribe-logic branch August 21, 2017 15:32
abcang pushed a commit to pixiv/mastodon that referenced this pull request Aug 22, 2017
lindwurm pushed a commit to akane-blue/mastodon that referenced this pull request Aug 22, 2017
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