Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit b4903fb

Browse files
committed
🐛 Addons should now update correctly
1 parent c563b05 commit b4903fb

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
## Changed
1111

1212
- Update to firefox `121.0`
13-
- Bump to preprelease betterfox
13+
- Bump to prerelease betterfox
14+
15+
## Fixed
16+
17+
- Addons will now update correctly (will send platform version rather than app version)
1418

1519
## 1.0.0-a.84
1620

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
diff --git a/toolkit/mozapps/extensions/internal/XPIInstall.jsm b/toolkit/mozapps/extensions/internal/XPIInstall.jsm
2+
index e0cac973f657048b34ee46e090dd0f3a85f1d91e..cbfa7b8130cee804850c13ad260f46dae18ef856 100644
3+
--- a/toolkit/mozapps/extensions/internal/XPIInstall.jsm
4+
+++ b/toolkit/mozapps/extensions/internal/XPIInstall.jsm
5+
@@ -2922,11 +2922,13 @@ var UpdateChecker = function (
6+
"resource://gre/modules/addons/AddonUpdateChecker.sys.mjs"
7+
));
8+
9+
+ if (!aPlatformVersion) aPlatformVersion = Services.appinfo.platformVersion;
10+
+
11+
this.addon = aAddon;
12+
aAddon._updateCheck = this;
13+
XPIInstall.doing(this);
14+
this.listener = aListener;
15+
- this.appVersion = aAppVersion;
16+
+ this.appVersion = aPlatformVersion;
17+
this.platformVersion = aPlatformVersion;
18+
this.syncCompatibility =
19+
aReason == AddonManager.UPDATE_WHEN_NEW_APP_INSTALLED;
20+
@@ -2953,7 +2955,7 @@ var UpdateChecker = function (
21+
aReason |= UPDATE_TYPE_NEWVERSION;
22+
}
23+
24+
- let url = escapeAddonURI(aAddon, updateURL, aReason, aAppVersion);
25+
+ let url = escapeAddonURI(aAddon, updateURL, aReason, aPlatformVersion);
26+
this._parser = AddonUpdateChecker.checkForUpdates(aAddon.id, url, this);
27+
};
28+

0 commit comments

Comments
 (0)