Skip to content

Commit eb668a9

Browse files
Copilotgortazar
andauthored
fix: remove unsupported chat manifest entries and bump patch version
Agent-Logs-Url: https://github.com/gortazar/thunderbird-slack-provider/sessions/e69e6200-d63e-4a46-884a-f14dd137f256 Co-authored-by: gortazar <203272+gortazar@users.noreply.github.com>
1 parent 585b0dc commit eb668a9

5 files changed

Lines changed: 12 additions & 37 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "thunderbird-slack-provider",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"private": true,
55
"scripts": {
66
"test": "jest",

src/background.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,13 @@ async function ensureSlackSpace() {
9898

9999
/**
100100
* Registers event listeners for the Thunderbird chat protocol.
101-
* The protocol itself is declared in manifest.json under "chat_protocols".
102-
* These listeners drive the account lifecycle: connecting, disconnecting, and
103-
* forwarding outgoing messages to the Slack API.
101+
* These listeners drive the account lifecycle (when available): connecting,
102+
* disconnecting, and forwarding outgoing messages to the Slack API.
104103
*/
105104
function registerChatProtocol() {
106105
if (!messenger.chat) {
107-
// messenger.chat is available in Thunderbird 128+ when the "chat" permission
108-
// is granted. Gracefully degrade on older builds.
106+
// messenger.chat may be unavailable depending on Thunderbird build/API
107+
// support. Gracefully degrade when the API is absent.
109108
console.warn("messenger.chat is not available in this version of Thunderbird.");
110109
return;
111110
}

src/manifest.json

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "Thunderbird Slack Provider",
4-
"version": "1.2.1",
4+
"version": "1.2.2",
55
"description": "Read and send Slack channel messages directly from Thunderbird.",
66
"author": "thunderbird-slack-provider contributors",
77
"icons": {
@@ -15,27 +15,10 @@
1515
"permissions": [
1616
"storage",
1717
"alarms",
18-
"chat",
1918
"https://slack.com/api/*",
2019
"https://files.slack.com/*",
2120
"https://avatars.slack-edge.com/*"
2221
],
23-
"chat_protocols": [
24-
{
25-
"name": "Slack",
26-
"description": "Connect Thunderbird Chat to your Slack workspace.",
27-
"iconURL": "icons/slack-96.svg",
28-
"hasPassword": false,
29-
"options": [
30-
{
31-
"name": "token",
32-
"label": "API Token",
33-
"type": "string",
34-
"default": ""
35-
}
36-
]
37-
}
38-
],
3922
"options_ui": {
4023
"page": "options.html",
4124
"open_in_tab": false

tests/unit/manifest.test.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,12 @@
33
const fs = require("fs");
44
const path = require("path");
55

6-
describe("manifest chat protocol declaration", () => {
7-
test("declares Slack chat protocol with iconURL so it appears in New Chat", () => {
6+
describe("manifest permissions and schema", () => {
7+
test("does not declare unsupported chat permission or chat_protocols property", () => {
88
const manifestPath = path.resolve(__dirname, "../../src/manifest.json");
99
const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
1010

11-
expect(Array.isArray(manifest.chat_protocols)).toBe(true);
12-
expect(manifest.chat_protocols).toEqual(
13-
expect.arrayContaining([
14-
expect.objectContaining({
15-
name: "Slack",
16-
iconURL: "icons/slack-96.svg",
17-
}),
18-
])
19-
);
11+
expect(manifest.permissions).not.toContain("chat");
12+
expect(manifest).not.toHaveProperty("chat_protocols");
2013
});
2114
});

0 commit comments

Comments
 (0)