messaging: owners can block a conversation
A blocked thread key is dropped unread (not announced, not counted against the daily new-conversation limit). API, UI button with confirmation, and a list with unblock. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
@@ -157,6 +157,24 @@ export async function deleteThread(listing: string, thread: string): Promise<voi
|
||||
await call("DELETE", `/api/v1/inbox/${e(listing)}/${e(thread)}`);
|
||||
}
|
||||
|
||||
export async function blockThread(listing: string, thread: string): Promise<void> {
|
||||
await call("PUT", `/api/v1/inbox/${e(listing)}/${e(thread)}/block`);
|
||||
}
|
||||
|
||||
export async function unblockThread(listing: string, thread: string): Promise<void> {
|
||||
await call("DELETE", `/api/v1/inbox/${e(listing)}/${e(thread)}/block`);
|
||||
}
|
||||
|
||||
export interface Blocked {
|
||||
listing: string;
|
||||
thread: string;
|
||||
blocked_at: number;
|
||||
}
|
||||
|
||||
export async function getBlocked(): Promise<Blocked[]> {
|
||||
return (await call("GET", "/api/v1/blocked")) as Blocked[];
|
||||
}
|
||||
|
||||
/** The saved address of a listing, or null if none is saved. */
|
||||
export async function getAddress(listing: string): Promise<Address | null> {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user