mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
Fix typos caught by typos.
https://github.com/crate-ci/typos Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
730b93c338
commit
bd884c88ed
@@ -59,7 +59,7 @@ def hex_to_b64(data: str) -> str:
|
||||
return base64.b64encode(bytes.fromhex(data)).decode()
|
||||
|
||||
|
||||
class UserPushIndentityCompat:
|
||||
class UserPushIdentityCompat:
|
||||
"""Compatibility class for supporting the transition from remote servers
|
||||
sending their UserProfile ids to the bouncer to sending UserProfile uuids instead.
|
||||
|
||||
@@ -100,7 +100,7 @@ class UserPushIndentityCompat:
|
||||
return result
|
||||
|
||||
def __eq__(self, other: Any) -> bool:
|
||||
if isinstance(other, UserPushIndentityCompat):
|
||||
if isinstance(other, UserPushIdentityCompat):
|
||||
return self.user_id == other.user_id and self.user_uuid == other.user_uuid
|
||||
return False
|
||||
|
||||
@@ -181,7 +181,7 @@ APNS_MAX_RETRIES = 3
|
||||
|
||||
@statsd_increment("apple_push_notification")
|
||||
def send_apple_push_notification(
|
||||
user_identity: UserPushIndentityCompat,
|
||||
user_identity: UserPushIdentityCompat,
|
||||
devices: Sequence[DeviceToken],
|
||||
payload_data: Mapping[str, Any],
|
||||
remote: Optional["RemoteZulipServer"] = None,
|
||||
@@ -307,7 +307,7 @@ def send_android_push_notification_to_user(
|
||||
) -> None:
|
||||
devices = list(PushDeviceToken.objects.filter(user=user_profile, kind=PushDeviceToken.GCM))
|
||||
send_android_push_notification(
|
||||
UserPushIndentityCompat(user_id=user_profile.id), devices, data, options
|
||||
UserPushIdentityCompat(user_id=user_profile.id), devices, data, options
|
||||
)
|
||||
|
||||
|
||||
@@ -358,7 +358,7 @@ def parse_gcm_options(options: Dict[str, Any], data: Dict[str, Any]) -> str:
|
||||
|
||||
@statsd_increment("android_push_notification")
|
||||
def send_android_push_notification(
|
||||
user_identity: UserPushIndentityCompat,
|
||||
user_identity: UserPushIdentityCompat,
|
||||
devices: Sequence[DeviceToken],
|
||||
data: Dict[str, Any],
|
||||
options: Dict[str, Any],
|
||||
@@ -1009,7 +1009,7 @@ def handle_remove_push_notification(user_profile_id: int, message_ids: List[int]
|
||||
if uses_notification_bouncer():
|
||||
send_notifications_to_bouncer(user_profile_id, apns_payload, gcm_payload, gcm_options)
|
||||
else:
|
||||
user_identity = UserPushIndentityCompat(user_id=user_profile_id)
|
||||
user_identity = UserPushIdentityCompat(user_id=user_profile_id)
|
||||
android_devices = list(
|
||||
PushDeviceToken.objects.filter(user=user_profile, kind=PushDeviceToken.GCM)
|
||||
)
|
||||
@@ -1145,6 +1145,6 @@ def handle_push_notification(user_profile_id: int, missed_message: Dict[str, Any
|
||||
len(android_devices),
|
||||
len(apple_devices),
|
||||
)
|
||||
user_identity = UserPushIndentityCompat(user_id=user_profile.id)
|
||||
user_identity = UserPushIdentityCompat(user_id=user_profile.id)
|
||||
send_apple_push_notification(user_identity, apple_devices, apns_payload)
|
||||
send_android_push_notification(user_identity, android_devices, gcm_payload, gcm_options)
|
||||
|
||||
Reference in New Issue
Block a user