chore: migrate getFileUrlFromMessage to ts (#3734)
This commit is contained in:
parent
6f27126f5e
commit
f27ddf2e22
|
@ -1,4 +1,4 @@
|
|||
export default function (message) {
|
||||
export default function (message: { type: string; url: string }) {
|
||||
if (/image/.test(message.type)) {
|
||||
return { image_url: message.url };
|
||||
}
|
|
@ -71,6 +71,8 @@ interface IMessageItem {
|
|||
msg?: string;
|
||||
starred: boolean;
|
||||
pinned: boolean;
|
||||
type: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
interface IParams {
|
||||
|
|
Loading…
Reference in New Issue