Skip to content

Commit

Permalink
Merge pull request #41 from Callhub-Connect/fix-email
Browse files Browse the repository at this point in the history
fixed email transcript again, use id instead of code
  • Loading branch information
lucieyang1 authored Dec 2, 2023
2 parents 8039358 + 59727e2 commit 2d2991a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/components/chat-component/Chat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ function clearSessionAndNavigate(){
// Clear the messages when the session ends
setMessages([]);
sessionStorage.removeItem("chatMessages");
sessionStorage.removeItem("sessionId");
sessionStorage.removeItem("sessionCode");
unsubscribeToEndSession(sessionEnded);

disconnectWebsocket();
Expand Down
6 changes: 3 additions & 3 deletions src/components/end-session-component/EndSession.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {

function EndSession() {
const emailRef = useRef();
const sessionCode = sessionStorage.getItem("sessionCode");
const sessionId = sessionStorage.getItem("sessionId");
const [success, setSuccess] = useState(false);
const [error, setError] = useState(false);

Expand All @@ -27,8 +27,8 @@ function EndSession() {
const templateId = "template_feo851p";

// TODO: change to azure endpoint
let transcriptUrl = 'http://localhost:8080/email/transcript/' + sessionCode
let dateUrl = 'http://localhost:8080/email/date/' + sessionCode
let transcriptUrl = 'http://localhost:8080/email/transcript/' + sessionId
let dateUrl = 'http://localhost:8080/email/date/' + sessionId

try {
const response = await axios.get(transcriptUrl);
Expand Down

0 comments on commit 2d2991a

Please sign in to comment.