feat: add Twilio SMS/call integration with settings, templates, and conversation history

This commit is contained in:
Gitead
2026-05-02 20:18:58 -04:00
parent b73b8c97c6
commit 5689269690
17 changed files with 770 additions and 196 deletions
@@ -21,10 +21,7 @@ export function MessageThread({ patient, onBack }: MessageThreadProps) {
const { data: communications = [], isLoading } = useQuery<Communication[]>({
queryKey: ["/api/patients", patient.id, "communications"],
queryFn: async () => {
const res = await fetch(`/api/patients/${patient.id}/communications`, {
credentials: "include",
});
if (!res.ok) throw new Error("Failed to fetch communications");
const res = await apiRequest("GET", `/api/patients/${patient.id}/communications`);
return res.json();
},
refetchInterval: 5000, // Refresh every 5 seconds to get new messages