File receipts read 'fetched for <Mind>', never 'read by'
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m32s
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m32s
The receipt means the mouth fetched and stored the file for the Mind, not that it is in her sandbox or was read. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
98b4ec8ab1
commit
6ba5647ea8
4 changed files with 12 additions and 11 deletions
|
|
@ -13,7 +13,7 @@ type FileReadByProps = {
|
|||
/** Receipts already read elsewhere (an album's thread replies): merged with the timeline's, a Mind once. */
|
||||
also?: FileReader[];
|
||||
};
|
||||
/** "read by <Mind>" under a file: the Minds whose verified receipts are in the room's timeline. Nothing when none. */
|
||||
/** "fetched for <Mind>" under a file: the Minds whose verified receipts are in the room's timeline. Nothing when none. */
|
||||
export function FileReadBy({ room, fileId, content, also = [] }: FileReadByProps) {
|
||||
const seen = useFileReaders(room, fileId, content);
|
||||
const readers = [...new Map([...also, ...seen].map((r) => [r.sender, r])).values()].sort(
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ describe('readLine', () => {
|
|||
],
|
||||
name
|
||||
)
|
||||
).toBe('read by void, eureka');
|
||||
).toBe('fetched for void, eureka');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export const hashForSend = async (data: Blob): Promise<string | undefined> => {
|
|||
};
|
||||
|
||||
export const readLine = (readBy: FileReader[], name: (sender: string) => string): string =>
|
||||
`read by ${readBy.map((r) => name(r.sender)).join(', ')}`;
|
||||
`fetched for ${readBy.map((r) => name(r.sender)).join(', ')}`;
|
||||
|
||||
const receiptOf = (e: ReceiptEvent) => {
|
||||
if (!e || typeof e !== 'object' || e.type !== FILE_RECEIVED || !e.event_id) return undefined;
|
||||
|
|
|
|||
Loading…
Reference in a new issue