style: apply biome formatting

This commit is contained in:
Peter Steinberger
2026-01-02 01:29:05 +01:00
parent 336048441c
commit c31070db24
13 changed files with 78 additions and 62 deletions

View File

@@ -176,15 +176,18 @@ export async function monitorIMessageProvider(
return;
}
const attachments = includeAttachments ? message.attachments ?? [] : [];
const attachments = includeAttachments ? (message.attachments ?? []) : [];
const firstAttachment = attachments?.find(
(entry) => entry?.original_path && !entry?.missing,
);
const mediaPath = firstAttachment?.original_path ?? undefined;
const mediaType = firstAttachment?.mime_type ?? undefined;
const kind = mediaKindFromMime(mediaType ?? undefined);
const placeholder =
kind ? `<media:${kind}>` : attachments?.length ? "<media:attachment>" : "";
const placeholder = kind
? `<media:${kind}>`
: attachments?.length
? "<media:attachment>"
: "";
const bodyText = messageText || placeholder;
if (!bodyText) return;
@@ -279,7 +282,9 @@ export async function monitorIMessageProvider(
const abort = opts.abortSignal;
const onAbort = () => {
if (subscriptionId) {
void client.request("watch.unsubscribe", { subscription: subscriptionId });
void client.request("watch.unsubscribe", {
subscription: subscriptionId,
});
}
void client.stop();
};