diff --git a/web/src/pages/SmsPage.tsx b/web/src/pages/SmsPage.tsx
index a8c7a95..2620d76 100644
--- a/web/src/pages/SmsPage.tsx
+++ b/web/src/pages/SmsPage.tsx
@@ -291,10 +291,11 @@ export default function SmsPage() {
const id = ++threadReqId.current;
if (!silent) setMessagesLoadingState(true);
const query: ThreadQuery = { peer: thread.peer, limit: THREAD_PAGE };
- if (device !== "all") query.deviceId = device;
- else {
- query.imsi = thread.imsi;
- }
+ if (device !== "all") query.deviceId = device;
+ else {
+ query.modemImei = thread.modemImei;
+ query.imsi = thread.imsi;
+ }
try {
const list = sortMessages(await getThread(query));
if (id !== threadReqId.current) return false;
@@ -425,10 +426,11 @@ export default function SmsPage() {
try {
const oldest = messagesRef.current[0];
const query: ThreadQuery = { peer: thread.peer, limit: THREAD_PAGE, beforeTs: oldest.timestamp, beforeId: oldest.id };
- if (device !== "all") query.deviceId = device;
- else {
- query.imsi = thread.imsi;
- }
+ if (device !== "all") query.deviceId = device;
+ else {
+ query.modemImei = thread.modemImei;
+ query.imsi = thread.imsi;
+ }
const older = sortMessages(await getThread(query));
setMessagesState([...older, ...messagesRef.current]);
setHasMoreState(older.length === THREAD_PAGE);
@@ -547,7 +549,7 @@ export default function SmsPage() {
const q: DeleteThreadQuery =
deviceRef.current !== "all"
? { deviceId: deviceRef.current, peer: t.peer }
- : { deviceId: "all", imsi: t.imsi, peer: t.peer };
+ : { deviceId: "all", modemImei: t.modemImei, imsi: t.imsi, peer: t.peer };
await deleteThread(q);
message.success(tl("已删除对话"));
if (keyRef.current === t.key) clearSelection(true);
diff --git a/web/src/types.ts b/web/src/types.ts
index 58e516f..6dc3767 100644
--- a/web/src/types.ts
+++ b/web/src/types.ts
@@ -229,6 +229,7 @@ export interface CardPolicy {
export interface SMSContact {
deviceId: string;
deviceName?: string;
+ modemImei?: string;
imsi: string;
localPhone?: string;
peer: string;
@@ -247,6 +248,7 @@ export interface SMSMessage {
id: number;
messageId?: string;
deviceId: string;
+ modemImei?: string;
imsi: string;
peer: string;
direction: "inbound" | "outbound" | "received" | "sent";
@@ -377,6 +379,7 @@ export interface SystemInfo {
os?: string;
architecture?: string;
uptime?: string;
+ developer?: boolean;
}
export type Notice = {