Bug 1581170 - Normalize FxA mobile type to phone. r=vladikoff

Differential Revision: https://phabricator.services.mozilla.com/D46479
This commit is contained in:
Edouard Oger
2019-09-19 15:25:44 +00:00
parent 758c91fe6a
commit 0d1c1a20f7

View File

@@ -879,10 +879,8 @@ var gSync = {
);
lastModified = new Date(target.clientRecord.serverLastModified * 1000);
} else {
const validFxADeviceTypes = ["desktop", "phone", "tablet", "tv", "vr"];
type = validFxADeviceTypes.includes(target.type)
? target.type
: "desktop";
// For phones, FxA uses "mobile" and Sync clients uses "phone".
type = target.type == "mobile" ? "phone" : target.type;
lastModified = null;
}
addTargetDevice(target.id, target.name, type, lastModified);