feat: expose PWA, app identity, and extension directory keys in JSON config #312
This commit is contained in:
@@ -389,7 +389,7 @@ export function CalendarInvitationBanner({ email }: CalendarInvitationBannerProp
|
||||
setActionError(null);
|
||||
try {
|
||||
// JMAP strips parameters from Content-Type (RFC 8621), so method=REQUEST
|
||||
// is lost. Fetch raw ICS to extract METHOD as a reliable fallback — in
|
||||
// is lost. Fetch raw ICS to extract METHOD as a reliable fallback - in
|
||||
// parallel with parsing to save a roundtrip.
|
||||
const [events, rawText] = await Promise.all([
|
||||
client.parseCalendarEvents(client.getCalendarsAccountId(), attachment.blobId),
|
||||
@@ -420,7 +420,7 @@ export function CalendarInvitationBanner({ email }: CalendarInvitationBannerProp
|
||||
|
||||
setState('parsed');
|
||||
|
||||
// Hydrate the calendar store with the matching event in the background —
|
||||
// Hydrate the calendar store with the matching event in the background -
|
||||
// only needed for the "already in calendar" pill, must not block the banner.
|
||||
// Filter by UID server-side; the previous unfiltered query fetched up to
|
||||
// 1000 events plus multiple /get batches just to find one match.
|
||||
|
||||
@@ -982,7 +982,7 @@ export function EmailComposer({
|
||||
try {
|
||||
const previousDraftId = draftIdRef.current;
|
||||
// Use the JMAP client and raw identity id for the *owning* account
|
||||
// — falls back to active client for single-account / same-account
|
||||
// - falls back to active client for single-account / same-account
|
||||
// identities. See `composerClient` derivation above.
|
||||
const savedDraftId = await composerClient.createDraft(
|
||||
toAddresses,
|
||||
@@ -1287,7 +1287,7 @@ export function EmailComposer({
|
||||
|
||||
// S/MIME send pipeline: build raw MIME → sign → encrypt → sendRawEmail
|
||||
if ((smimeSign_ || smimeEncrypt_) && client && currentIdentity?.id) {
|
||||
// S/MIME keys are scoped to one JMAP account's identity — sending
|
||||
// S/MIME keys are scoped to one JMAP account's identity - sending
|
||||
// from a cross-account identity via S/MIME would mix accounts'
|
||||
// certs/clients. Refuse upfront and tell the user to switch.
|
||||
const crossAccount = stripCrossAccountIdentityPrefix(currentIdentity.id);
|
||||
@@ -1440,7 +1440,7 @@ export function EmailComposer({
|
||||
const outgoing = await emailHooks.onTransformOutgoingEmail.transform(transformInput);
|
||||
|
||||
// Strip the cross-account namespace from the identity id before
|
||||
// handing it to the parent — the JMAP server only knows the raw
|
||||
// handing it to the parent - the JMAP server only knows the raw
|
||||
// id. The owning local account travels alongside so the parent
|
||||
// can route the send through the right client.
|
||||
const rawIdentityId = outgoing.identityId || currentIdentity?.id;
|
||||
|
||||
@@ -1142,7 +1142,7 @@ export function EmailViewer({
|
||||
|
||||
const handleViewContactSidebar = (contact: ContactCard | null, recipientEmail: string) => {
|
||||
if (isMobileDevice) {
|
||||
// No room for a sidebar on mobile — send the user to the contacts page
|
||||
// No room for a sidebar on mobile - send the user to the contacts page
|
||||
// with params describing what to show. The `from=email` flag turns the
|
||||
// page's mobile back button into a router.back() that returns here.
|
||||
const allRecipients = [
|
||||
@@ -2896,7 +2896,7 @@ export function EmailViewer({
|
||||
// window between selectedEmail changing and isLoading flipping true, so the
|
||||
// quick reply / body don't flicker through a partial render.
|
||||
// An empty bodyValues with no referenced parts means the email has no body
|
||||
// (e.g. calendar-only invites) — not "still loading".
|
||||
// (e.g. calendar-only invites) - not "still loading".
|
||||
const hasBodyParts = (email?.textBody?.length ?? 0) > 0 || (email?.htmlBody?.length ?? 0) > 0;
|
||||
const isBodyLoading = isLoading || (hasBodyParts && (!email?.bodyValues || Object.keys(email.bodyValues).length === 0));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user