chore: migrate getFileUrlFromMessage to ts (#3734)

This commit is contained in:
Alex Junior 2022-02-21 15:19:40 -03:00 committed by GitHub
parent 6f27126f5e
commit f27ddf2e22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -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 };
}

View File

@ -71,6 +71,8 @@ interface IMessageItem {
msg?: string;
starred: boolean;
pinned: boolean;
type: string;
url: string;
}
interface IParams {