Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const QuestionInput = ({ onSend, disabled, placeholder, clearOnSend, init
};

const disableRequiredAccessControl = requireLogin && !loggedIn;
const sendQuestionDisabled = disabled || !question.trim() || requireLogin;
const sendQuestionDisabled = disabled || !question.trim();
Copy link
Collaborator

@pamelafox pamelafox Dec 1, 2024

Choose a reason for hiding this comment

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

Hm, I wonder if it would make more sense to have || disableRequiredAccessControl? Would that also resolve the bug, since it should only be true when not logged in.

It's not a difference security-wise, since a logged out user will fail the authentication check on the server-side, but it'd make sense visually/for screen readers, I think.


if (disableRequiredAccessControl) {
placeholder = "Please login to continue...";
Expand Down