mirror of
https://github.com/block/buzz.git
synced 2026-12-01 13:42:45 +00:00
fix(snapshot): send Buzz shares as PNG avatar cards (#1811)
Signed-off-by: Will Pfleger <pfleger.will@gmail.com> Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
This commit is contained in:
@@ -124,12 +124,14 @@ export async function exportAgentSnapshot(
|
||||
memoryLevel: SnapshotMemoryLevel,
|
||||
format: SnapshotFormat,
|
||||
memorySourcePubkey?: string | null,
|
||||
avatarPngDataUrl?: string,
|
||||
): Promise<boolean> {
|
||||
return invokeTauri<boolean>("export_agent_snapshot", {
|
||||
id,
|
||||
memorySourcePubkey: memorySourcePubkey ?? null,
|
||||
memoryLevel,
|
||||
format,
|
||||
avatarPngDataUrl: avatarPngDataUrl ?? null,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -154,12 +156,14 @@ export async function encodeAgentSnapshotForSend(
|
||||
memoryLevel: SnapshotMemoryLevel,
|
||||
format: SnapshotFormat,
|
||||
memorySourcePubkey?: string | null,
|
||||
avatarPngDataUrl?: string,
|
||||
): Promise<EncodedSnapshotPayload> {
|
||||
return invokeTauri<EncodedSnapshotPayload>("encode_agent_snapshot_for_send", {
|
||||
id,
|
||||
memorySourcePubkey: memorySourcePubkey ?? null,
|
||||
memoryLevel,
|
||||
format,
|
||||
avatarPngDataUrl: avatarPngDataUrl ?? null,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -33,10 +33,9 @@ export type ResolvedSnapshotCard = {
|
||||
/** Discriminant for the snapshot kind — currently only "agent". */
|
||||
snapshotKind: "agent";
|
||||
/**
|
||||
* Optional thumbnail URL for the card icon. For `.agent.json` attachments
|
||||
* this comes from the imeta `thumb` field set by the sender. For
|
||||
* `.agent.png` attachments it falls back to the attachment URL itself
|
||||
* (the PNG is the avatar card image).
|
||||
* Optional thumbnail URL for the card icon. PNG snapshots use the
|
||||
* attachment URL because the PNG body is the avatar card image. JSON
|
||||
* snapshots have no thumbnail and use the generic icon.
|
||||
*/
|
||||
thumb?: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user