Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
fix: return simple uaid to hello
Browse files Browse the repository at this point in the history
Closes #1185
  • Loading branch information
bbangert committed Apr 23, 2018
1 parent d46f48c commit ae2f3b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion autopush/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def hello(self, uaid=None, services=None):
result = json.loads(self.ws.recv())
log.debug("Recv: %s", result)
assert result["status"] == 200
assert "-" not in result["uaid"]
if self.uaid and self.uaid != result["uaid"]: # pragma: nocover
log.debug("Mismatch on re-using uaid. Old: %s, New: %s",
self.uaid, result["uaid"])
Expand Down Expand Up @@ -1234,7 +1235,7 @@ def test_webpush_monthly_rotation(self):
yield deferToThread(
self.conn.db.message.table.delete_item,
Key={'uaid': client.uaid, 'chidmessageid': ' '}
)
)

# Verify the channel is gone
exists, chans = yield deferToThread(
Expand Down
4 changes: 2 additions & 2 deletions autopush_rs/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ where
message_month,
connected_at,
stats: SessionStatistics {
uaid: uaid.hyphenated().to_string(),
uaid: uaid.simple().to_string(),
uaid_reset: reset_uaid,
existing_uaid: check_storage,
connection_type: String::from("webpush"),
Expand All @@ -420,7 +420,7 @@ where
srv.connect_client(RegisteredClient { uaid, uid, tx });

let response = ServerMessage::Hello {
uaid: uaid.hyphenated().to_string(),
uaid: uaid.simple().to_string(),
status: 200,
use_webpush: Some(true),
broadcasts: Service::into_hashmap(broadcasts),
Expand Down

0 comments on commit ae2f3b4

Please sign in to comment.