Prevent attachments being sent for unapproved conversations.
This commit is contained in:
parent
09bcbe6139
commit
ffad806366
|
@ -473,5 +473,6 @@
|
|||
"hideRequestBanner": "Hide Message Request Banner",
|
||||
"openMessageRequestInbox": "View Message Requests",
|
||||
"noMessageRequestsPending": "No pending message requests",
|
||||
"noMediaUntilApproved": "You cannot send attachments until the conversation is approved",
|
||||
"openMessageRequestInboxDescription": "View your Message Request inbox"
|
||||
}
|
||||
|
|
|
@ -729,6 +729,13 @@ class CompositionBoxInner extends React.Component<Props, State> {
|
|||
}
|
||||
|
||||
private onChooseAttachment() {
|
||||
if (
|
||||
!this.props.selectedConversation?.didApproveMe &&
|
||||
this.props.selectedConversation?.isPrivate
|
||||
) {
|
||||
ToastUtils.pushNoMediaUntilApproved();
|
||||
return;
|
||||
}
|
||||
this.fileInput.current?.click();
|
||||
}
|
||||
|
||||
|
|
|
@ -279,3 +279,7 @@ export function pushNoAudioInputFound() {
|
|||
export function pushNoAudioOutputFound() {
|
||||
pushToastWarning('noAudioInputFound', window.i18n('noAudioOutputFound'));
|
||||
}
|
||||
|
||||
export function pushNoMediaUntilApproved() {
|
||||
pushToastError('noMediaUntilApproved', window.i18n('noMediaUntilApproved'));
|
||||
}
|
||||
|
|
|
@ -476,4 +476,5 @@ export type LocalizerKeys =
|
|||
| 'openMessageRequestInboxDescription'
|
||||
| 'hideRequestBanner'
|
||||
| 'noMessageRequestsPending'
|
||||
| 'noMediaUntilApproved'
|
||||
| 'reportIssue';
|
||||
|
|
Loading…
Reference in New Issue