feat(iios): expose senderId (stable externalId) on MessageDto
The app needs a reliable "is this message mine?" signal. senderActorId worked only with a lazily-learned actorId, which Supabase token-refresh wipes. senderId is the sender's externalId (email/username) — always present and comparable to the session user — so message alignment is deterministic. Verified: senderId round-trips = email. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,7 @@ export interface MessageDto {
|
||||
id: string;
|
||||
threadId: string;
|
||||
senderActorId: string;
|
||||
senderId: string; // the sender's stable externalId (email/username) — reliable "is this mine?"
|
||||
senderName: string;
|
||||
content: string;
|
||||
contentRef?: string;
|
||||
@@ -506,6 +507,7 @@ export class MessageService {
|
||||
id: interaction.id,
|
||||
threadId,
|
||||
senderActorId: interaction.actorId ?? '',
|
||||
senderId: interaction.actor?.sourceHandle?.externalId ?? '',
|
||||
senderName: interaction.actor?.displayName ?? interaction.actor?.sourceHandle?.externalId ?? 'unknown',
|
||||
content: text?.bodyText ?? '',
|
||||
contentRef: file?.contentRef ?? undefined,
|
||||
|
||||
Reference in New Issue
Block a user