Skip to content
GitLab
Menu
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
f27ddf2e
Unverified
Commit
f27ddf2e
authored
Feb 21, 2022
by
Alex Junior
Committed by
GitHub
Feb 21, 2022
Browse files
chore: migrate getFileUrlFromMessage to ts (#3734)
parent
6f27126f
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/lib/methods/helpers/getFileUrlFromMessage.
j
s
→
app/lib/methods/helpers/getFileUrlFromMessage.
t
s
View file @
f27ddf2e
export
default
function
(
message
)
{
export
default
function
(
message
:
{
type
:
string
;
url
:
string
}
)
{
if
(
/image/
.
test
(
message
.
type
))
{
if
(
/image/
.
test
(
message
.
type
))
{
return
{
image_url
:
message
.
url
};
return
{
image_url
:
message
.
url
};
}
}
...
...
app/views/MessagesView/index.tsx
View file @
f27ddf2e
...
@@ -71,6 +71,8 @@ interface IMessageItem {
...
@@ -71,6 +71,8 @@ interface IMessageItem {
msg
?:
string
;
msg
?:
string
;
starred
:
boolean
;
starred
:
boolean
;
pinned
:
boolean
;
pinned
:
boolean
;
type
:
string
;
url
:
string
;
}
}
interface
IParams
{
interface
IParams
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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