Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
RocketChat
Rocket.Chat.ReactNative
Commits
982b1d39
Unverified
Commit
982b1d39
authored
Feb 05, 2020
by
Diego Mello
Committed by
GitHub
Feb 05, 2020
Browse files
[FIX] Disallow empty sharing (#1664)
parent
38c7d8a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/containers/MessageActions.js
View file @
982b1d39
...
...
@@ -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
});
...
...
app/views/InviteUsersView/index.js
View file @
982b1d39
...
...
@@ -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
});
...
...
app/views/RoomActionsView/index.js
View file @
982b1d39
...
...
@@ -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
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment