mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 18:36:36 +00:00
urls: Rename arguments to accounts/unsubscribe.
type -> email_type to match future work on ScheduledJob. token -> confirmation_key to match what the other confirmation views urls call this argument.
This commit is contained in:
@@ -39,14 +39,14 @@ def unsubscribe_token(user_profile):
|
||||
# unsubscription tokens.
|
||||
return Confirmation.objects.get_link_for_object(user_profile, 'unused').split("/")[-1]
|
||||
|
||||
def one_click_unsubscribe_link(user_profile, endpoint):
|
||||
def one_click_unsubscribe_link(user_profile, email_type):
|
||||
# type: (UserProfile, Text) -> Text
|
||||
"""
|
||||
Generate a unique link that a logged-out user can visit to unsubscribe from
|
||||
Zulip e-mails without having to first log in.
|
||||
"""
|
||||
token = unsubscribe_token(user_profile)
|
||||
resource_path = "accounts/unsubscribe/%s/%s" % (endpoint, token)
|
||||
resource_path = "accounts/unsubscribe/%s/%s" % (email_type, token)
|
||||
return "%s/%s" % (user_profile.realm.uri.rstrip("/"), resource_path)
|
||||
|
||||
def hash_util_encode(string):
|
||||
|
||||
Reference in New Issue
Block a user