Live location share - enable reply and react to tiles (#8721)
* test most basic paths in messageactionbar Signed-off-by: Kerry Archibald <kerrya@element.io> * tidy Signed-off-by: Kerry Archibald <kerrya@element.io> * use rtl for MessageActionBar test Signed-off-by: Kerry Archibald <kerrya@element.io> * make beacon_info events semi actionable Signed-off-by: Kerry Archibald <kerrya@element.io> * remove log Signed-off-by: Kerry Archibald <kerrya@element.io> * test thread exception for beacon Signed-off-by: Kerry Archibald <kerrya@element.io> * eat click events in beacon status to stop jumping from reply tile Signed-off-by: Kerry Archibald <kerrya@element.io> * set max width on beaconbody for render in thread panel
This commit is contained in:
parent
a74b9a7083
commit
79a2dfe171
6 changed files with 143 additions and 10 deletions
|
@ -21,6 +21,7 @@ import { EventStatus, MatrixEvent, MatrixEventEvent } from 'matrix-js-sdk/src/mo
|
|||
import classNames from 'classnames';
|
||||
import { MsgType, RelationType } from 'matrix-js-sdk/src/@types/event';
|
||||
import { Thread } from 'matrix-js-sdk/src/models/thread';
|
||||
import { M_BEACON_INFO } from 'matrix-js-sdk/src/@types/beacon';
|
||||
|
||||
import type { Relations } from 'matrix-js-sdk/src/models/relations';
|
||||
import { _t } from '../../../languageHandler';
|
||||
|
@ -329,8 +330,14 @@ export default class MessageActionBar extends React.PureComponent<IMessageAction
|
|||
|
||||
const inNotThreadTimeline = this.context.timelineRenderingType !== TimelineRenderingType.Thread;
|
||||
|
||||
const isAllowedMessageType = !this.forbiddenThreadHeadMsgType.includes(
|
||||
this.props.mxEvent.getContent().msgtype as MsgType,
|
||||
const isAllowedMessageType = (
|
||||
!this.forbiddenThreadHeadMsgType.includes(
|
||||
this.props.mxEvent.getContent().msgtype as MsgType) &&
|
||||
/** forbid threads from live location shares
|
||||
* until cross-platform support
|
||||
* (PSF-1041)
|
||||
*/
|
||||
!M_BEACON_INFO.matches(this.props.mxEvent.getType())
|
||||
);
|
||||
|
||||
return inNotThreadTimeline && isAllowedMessageType;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue