Merge pull request #80 from wagesj45/codex/modify-details.js-to-request-message-ids

Update details popup to load message IDs
This commit is contained in:
Jordan Wages 2025-07-08 16:44:22 -05:00 committed by GitHub
commit c420699e51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,11 +10,11 @@ const qMid = parseInt(new URLSearchParams(location.search).get("mid"), 10);
if (!isNaN(qMid)) { if (!isNaN(qMid)) {
loadMessage(qMid); loadMessage(qMid);
} else { } else {
const { messages } = await browser.runtime.sendMessage({ const { ids } = await browser.runtime.sendMessage({
type: "sortana:getDisplayedMessages", type: "sortana:getDisplayedMessages",
}); });
if (messages && messages[0]) { if (ids && ids[0]) {
loadMessage(messages[0].id); loadMessage(ids[0]);
} else { } else {
const tabs = await browser.tabs.query({ active: true, currentWindow: true }); const tabs = await browser.tabs.query({ active: true, currentWindow: true });
const tabId = tabs[0]?.id; const tabId = tabs[0]?.id;