diff --git a/src/components/views/messages/MJitsiWidgetEvent.tsx b/src/components/views/messages/MJitsiWidgetEvent.tsx index 5171780ecc..bd161b5ca2 100644 --- a/src/components/views/messages/MJitsiWidgetEvent.tsx +++ b/src/components/views/messages/MJitsiWidgetEvent.tsx @@ -34,15 +34,8 @@ export default class MJitsiWidgetEvent extends React.PureComponent { const prevUrl = this.props.mxEvent.getPrevContent()['url']; const senderName = this.props.mxEvent.sender?.name || this.props.mxEvent.getSender(); - // XXX: We are assuming that there will only be one Jitsi widget per room, which isn't entirely - // safe but if there's more than 1 the user will be super confused anyways - the copy doesn't - // need to concern itself with this. - const roomInfo = WidgetStore.instance.getRoom(this.props.mxEvent.getRoomId()); - const isPinned = roomInfo?.widgets - .some(w => WidgetType.JITSI.matches(w.type) && WidgetStore.instance.isPinned(w.id)); - let joinCopy = _t('Join the conference at the top of this room'); - if (!isPinned) { + if (!WidgetStore.instance.isPinned(this.props.mxEvent.getStateKey())) { joinCopy = _t('Join the conference from the room information card on the right'); }