Unverified Commit 982b1d39 authored by Diego Mello's avatar Diego Mello Committed by GitHub
Browse files

[FIX] Disallow empty sharing (#1664)

parent 38c7d8a8
......@@ -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
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment