[FIX] Disallow empty sharing (#1664)
This commit is contained in:
parent
38c7d8a874
commit
982b1d39e9
|
@ -262,6 +262,9 @@ class MessageActions extends React.Component {
|
|||
handleShare = async() => {
|
||||
const { message } = this.props;
|
||||
const permalink = await this.getPermalink(message);
|
||||
if (!permalink) {
|
||||
return;
|
||||
}
|
||||
Share.share({
|
||||
message: permalink
|
||||
});
|
||||
|
|
|
@ -52,7 +52,7 @@ class InviteUsersView extends React.Component {
|
|||
|
||||
share = () => {
|
||||
const { invite } = this.props;
|
||||
if (!invite) {
|
||||
if (!invite || !invite.url) {
|
||||
return;
|
||||
}
|
||||
Share.share({ message: invite.url });
|
||||
|
|
|
@ -389,6 +389,9 @@ class RoomActionsView extends React.Component {
|
|||
handleShare = () => {
|
||||
const { room } = this.state;
|
||||
const permalink = RocketChat.getPermalinkChannel(room);
|
||||
if (!permalink) {
|
||||
return;
|
||||
}
|
||||
Share.share({
|
||||
message: permalink
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue