Add authors to tasks

This commit is contained in:
2026-03-03 17:43:12 +00:00
parent 18351abb00
commit 8ea2afb259
10 changed files with 190 additions and 23 deletions

View File

@@ -343,6 +343,8 @@
<label class="checkbox is-size-7"><input type="checkbox" class="compose-export-field" value="text" checked> Text</label>
<label class="checkbox is-size-7"><input type="checkbox" class="compose-export-field" value="time" checked> Time</label>
<label class="checkbox is-size-7"><input type="checkbox" class="compose-export-field" value="sender" checked> Sender</label>
<label class="checkbox is-size-7"><input type="checkbox" class="compose-export-field" value="author" checked> Author</label>
<label class="checkbox is-size-7"><input type="checkbox" class="compose-export-field" value="author_identifier"> Author Identifier</label>
<label class="checkbox is-size-7"><input type="checkbox" class="compose-export-field" value="source_service"> Source</label>
<label class="checkbox is-size-7"><input type="checkbox" class="compose-export-field" value="source_label"> Source Label</label>
<label class="checkbox is-size-7"><input type="checkbox" class="compose-export-field" value="direction"> Direction</label>
@@ -398,7 +400,7 @@
data-engage-preview-url="{{ compose_engage_preview_url }}"
data-engage-send-url="{{ compose_engage_send_url }}">
{% for msg in serialized_messages %}
<div class="compose-row {% if msg.outgoing %}is-out{% else %}is-in{% endif %}" data-ts="{{ msg.ts }}" data-message-id="{{ msg.id }}" data-author="{{ msg.author|default:''|escape }}" data-display-ts="{{ msg.display_ts|escape }}" data-source-service="{{ msg.source_service|default:''|escape }}" data-source-label="{{ msg.source_label|default:''|escape }}" data-source-message-id="{{ msg.source_message_id|default:''|escape }}" data-direction="{% if msg.outgoing %}outgoing{% else %}incoming{% endif %}"{% if msg.reply_to_id %} data-reply-to-id="{{ msg.reply_to_id }}"{% endif %} data-reply-snippet="{{ msg.display_text|default:msg.text|default:''|truncatechars:120|escape }}">
<div class="compose-row {% if msg.outgoing %}is-out{% else %}is-in{% endif %}" data-ts="{{ msg.ts }}" data-message-id="{{ msg.id }}" data-author="{{ msg.author|default:''|escape }}" data-sender-uuid="{{ msg.sender_uuid|default:''|escape }}" data-display-ts="{{ msg.display_ts|escape }}" data-source-service="{{ msg.source_service|default:''|escape }}" data-source-label="{{ msg.source_label|default:''|escape }}" data-source-message-id="{{ msg.source_message_id|default:''|escape }}" data-direction="{% if msg.outgoing %}outgoing{% else %}incoming{% endif %}"{% if msg.reply_to_id %} data-reply-to-id="{{ msg.reply_to_id }}"{% endif %} data-reply-snippet="{{ msg.display_text|default:msg.text|default:''|truncatechars:120|escape }}">
{% if msg.gap_fragments %}
{% with gap=msg.gap_fragments.0 %}
<p
@@ -2785,6 +2787,7 @@
);
row.dataset.author = String(msg.author || "");
row.dataset.displayTs = String(msg.display_ts || msg.ts || "");
row.dataset.senderUuid = String(msg.sender_uuid || "");
row.dataset.sourceService = String(msg.source_service || "");
row.dataset.sourceLabel = String(msg.source_label || "");
row.dataset.sourceMessageId = String(msg.source_message_id || "");
@@ -3451,11 +3454,14 @@
const text = String(bodyNode ? bodyNode.textContent || "" : "").trim();
const authorRaw = String(row.dataset.author || "").trim();
const author = authorRaw || (row.classList.contains("is-out") ? "USER" : "CONTACT");
const authorIdentifier = String(row.dataset.senderUuid || "").trim();
const when = String(row.dataset.displayTs || "").trim();
return {
message_id: String(row.dataset.messageId || ""),
ts: toInt(row.dataset.ts || 0),
sender: author,
author: author,
author_identifier: authorIdentifier,
time: when,
direction: String(row.dataset.direction || (row.classList.contains("is-out") ? "outgoing" : "incoming")),
source_service: String(row.dataset.sourceService || "").trim(),
@@ -3467,7 +3473,7 @@
};
const selectedExportFields = function () {
const defaults = ["text", "time", "sender"];
const defaults = ["text", "time", "sender", "author"];
const picked = exportFieldChecks
.filter(function (node) { return !!(node && node.checked); })
.map(function (node) { return String(node.value || "").trim(); })
@@ -3486,7 +3492,7 @@
seen.add(key);
return true;
});
const priority = ["time", "sender"];
const priority = ["time", "sender", "author"];
const ordered = [];
priority.forEach(function (key) {
if (normalized.includes(key)) {