Skip to content

Commit

Permalink
Merge pull request #298 from CaritasDeutschland/hotfix-feedbackSession
Browse files Browse the repository at this point in the history
fix: 🐛 error on isFeedbackSession
  • Loading branch information
koepferd authored Dec 15, 2021
2 parents 5f78e03 + 0707721 commit d1c204b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/message/MessageItemComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export const MessageItemComponent = ({
activeSession.type !== SESSION_LIST_TYPES.ENQUIRY &&
chatItem.feedbackGroupId &&
hasUserAuthority(AUTHORITIES.USE_FEEDBACK, userData) &&
!activeSession.isFeedbackSession;
!activeSession?.isFeedbackSession;

const videoCallMessage: VideoCallMessageDTO = alias?.videoCallMessageDTO;
const isFurtherStepsMessage =
Expand Down Expand Up @@ -264,7 +264,7 @@ export const MessageItemComponent = ({
hasRenderedMessage={hasRenderedMessage}
/>
))}
{activeSession.isFeedbackSession && (
{activeSession?.isFeedbackSession && (
<CopyMessage
right={isMyMessage}
message={renderedMessage}
Expand Down
2 changes: 1 addition & 1 deletion src/components/message/MessageMetaData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const MessageMetaData = (props: MessageMetaDataProps) => {
if (
hasUserAuthority(AUTHORITIES.ASKER_DEFAULT, userData) ||
hasUserAuthority(AUTHORITIES.ANONYMOUS_DEFAULT, userData) ||
activeSession.isFeedbackSession ||
activeSession?.isFeedbackSession ||
props.isReadStatusDisabled
) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ export const MessageSubmitInterfaceComponent = (
hasUserAuthority(AUTHORITIES.USE_FEEDBACK, userData) &&
!hasUserAuthority(AUTHORITIES.VIEW_ALL_PEER_SESSIONS, userData) &&
activeSession.session.feedbackGroupId &&
!activeSession.isFeedbackSession;
!activeSession?.isFeedbackSession;
return (
<div
className={clsx(
Expand Down

0 comments on commit d1c204b

Please sign in to comment.