fix: reshared posts should be shown in feed
This commit is contained in:
@@ -67,6 +67,11 @@ export type Post = {
|
||||
* collection contents). Always false / absent for anonymous viewers.
|
||||
* Drives the post-card "Reshare ↔ Send" swap. */
|
||||
viewer_has_reshared?: boolean;
|
||||
/** Non-null only on rows that appear in a profile feed because the
|
||||
* profile owner reshared them. Drives the "↻ Reshared" header in
|
||||
* the post card and the COALESCE(reshared_at, created_at) sort on
|
||||
* the BFF. Authored posts leave this null. */
|
||||
reshared_at?: string | null;
|
||||
};
|
||||
|
||||
export type Bookmark = {
|
||||
@@ -100,6 +105,15 @@ export type PublicProfile = {
|
||||
public_collections: Collection[];
|
||||
};
|
||||
|
||||
export type Feedback = {
|
||||
id: string;
|
||||
user_id?: string;
|
||||
category: string;
|
||||
message: string;
|
||||
contact_email?: string;
|
||||
created_at: string;
|
||||
};
|
||||
|
||||
// ─── Posts ───────────────────────────────────────────────────────────────
|
||||
|
||||
export const posts = {
|
||||
@@ -288,6 +302,29 @@ export const collections = {
|
||||
},
|
||||
};
|
||||
|
||||
// ─── Feedback ────────────────────────────────────────────────────────────
|
||||
|
||||
export const feedback = {
|
||||
/** Submit a /feedback page entry. When the viewer is signed in the
|
||||
* BFF captures their user_id automatically via the auth cookie —
|
||||
* the form doesn't ask for it. `contact_email` is required only
|
||||
* for anonymous submissions; the BFF re-enforces that on its end. */
|
||||
submit(input: {
|
||||
category: "bug" | "feature" | "general" | "other";
|
||||
message: string;
|
||||
contact_email?: string;
|
||||
}) {
|
||||
return call<Feedback>("/feedback", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
category: input.category,
|
||||
message: input.message,
|
||||
contact_email: input.contact_email || undefined,
|
||||
}),
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
// ─── Public profile ──────────────────────────────────────────────────────
|
||||
|
||||
export const profile = {
|
||||
|
||||
Reference in New Issue
Block a user