Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds fix to validate if session is still valid on chat. #51

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aldompe95
Copy link
Contributor

  • Adds validation to verify if session is still valid when using the chat, if the session is not valid redirects to home page that will follow the login process again.

@aldompe95 aldompe95 requested a review from obie May 4, 2023 19:51
@@ -29,7 +29,28 @@ export default class extends ApplicationController {
if (this.element.value.length === 0) {
return;
}
this.stimulate('ChatReflex#prompt')

const xhr = new XMLHttpRequest();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When would this fire off?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a better solution is probably to put the check in the ApplicationReflex, similar to how it works in ApplicationController

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be executed after session verification its done.

Yes let me check how to do that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants