fix: re-derive conversation authorship from history
Rooms that Reddit returns without timeline events in /sync fell back to isFromUs=false, so an unanswered opener of ours was projected as inbound and surfaced in the dashboard's "Needs reply" queue. loadDetails already paginates the authoritative history for lastMessageSnippet/Time, so take isFromUs from the same newest message. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
38d175e4a1
commit
7defff422d
2 files changed
+58
-2
No files matched your search
@@ -1135,8 +1135,14 @@ export class ChatService {
|
||||
return;
|
||||
}
|
||||
|
||||
chat.lastMessageSnippet = chat.messages[chat.messages.length - 1].text;
|
||||
chat.lastMessageTime = chat.messages[chat.messages.length - 1].timestamp;
|
||||
const newest = chat.messages[chat.messages.length - 1];
|
||||
chat.lastMessageSnippet = newest.text;
|
||||
chat.lastMessageTime = newest.timestamp;
|
||||
// Re-derive authorship from the authoritative history. Room summaries built
|
||||
// from /sync default `isFromUs` to false when the room carries no timeline
|
||||
// events (Reddit omits them for idle rooms), which would otherwise leave an
|
||||
// unanswered opener of ours sitting in the operator's "Needs reply" queue.
|
||||
chat.isFromUs = newest.isSelf;
|
||||
|
||||
const firstSelf = chat.messages.find((m) => m.isSelf);
|
||||
if (firstSelf) chat.originMessage = firstSelf.text;
|
||||
|
||||
Reference in new issue
Block a user