Skip to content

Commit b5ebf68

Browse files
committed
qmodem-next: fix mark read for multi part sms
1 parent 4c23129 commit b5ebf68

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

luci/luci-app-qmodem-next/htdocs/luci-static/resources/view/qmodem/sms_conversation.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,12 @@ return view.extend({
371371
var unreadIds = [];
372372
result.messages.forEach(function(msg) {
373373
if (msg.type === 'received' && msg.is_read === false) {
374-
unreadIds.push(msg.id);
374+
if (msg.part_ids && msg.part_ids.length > 0) {
375+
// For multipart messages, mark all parts as read
376+
unreadIds = unreadIds.concat(msg.part_ids);
377+
} else {
378+
unreadIds.push(msg.id);
379+
}
375380
}
376381
});
377382
if (unreadIds.length > 0) {

0 commit comments

Comments
 (0)