fix p2p topic canonicalization and stale subscriptions
This commit is contained in:
@@ -100,9 +100,8 @@ func TestPreparePayloadsUsesAliasAndNormalizesP2PTopic(t *testing.T) {
|
||||
if got := payload.Audience["alias"][0]; got != aliasForUid(callee) {
|
||||
t.Fatalf("unexpected alias: %s", got)
|
||||
}
|
||||
userTopic, _ := types.P2PNameForUser(callee, topic)
|
||||
if got := payload.Notification.Android.Extras["topic"]; got != userTopic {
|
||||
t.Fatalf("topic was not normalized for callee: got %s want %s", got, userTopic)
|
||||
if got := payload.Notification.Android.Extras["topic"]; got != topic {
|
||||
t.Fatalf("topic was not kept canonical for callee: got %s want %s", got, topic)
|
||||
}
|
||||
if payload.Notification.IOS.Badge != "3" {
|
||||
t.Fatalf("unexpected badge: %s", payload.Notification.IOS.Badge)
|
||||
|
||||
Reference in New Issue
Block a user