Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/wx/api/sieve/SieveAccountsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,23 @@
},

async getUsername(id) {
return await getIncomingServer(id).realUsername;
const server = getIncomingServer(id);
let username = await server.username;
if (username) {
return username;
}
// old API property
return await server.realUsername;
},

async getHostname(id) {
return await getIncomingServer(id).realHostName;
const server = getIncomingServer(id);
let hostName = await server.hostName;
if (hostName) {
return hostName;
}
// old API property
return await server.realHostName;
}
}
}
Expand Down
10 changes: 8 additions & 2 deletions src/wx/api/sieve/SieveSocketApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@

/* global ExtensionCommon */
/* global Components */
/* global ChromeUtils */
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
/* global Services */

// Input & output stream constants.
const STREAM_BUFFERED = 0;
Expand Down Expand Up @@ -242,6 +241,13 @@
if (this.state !== STATE_OPEN)
throw new Error("Socket not in open state");

// test for Thunderbird 128 Socket API
if (this.socket.tlsSocketControl) {
// return the promise returned by the async API call to be awaited
return this.socket.tlsSocketControl.asyncStartTLS();
}

// logic for older socket API
const control = this.socket.securityInfo
.QueryInterface(Ci.nsISSLSocketControl);

Expand Down
Loading