Skip to content

Commit

Permalink
Merge pull request #348 from weni-ai/feature/geolocation-message
Browse files Browse the repository at this point in the history
Added geolocation media message variation
  • Loading branch information
Aldemylla authored Oct 9, 2023
2 parents 9fa23a3 + 9fab038 commit d9f62e6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/chats/MediaMessage/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<section v-if="isDocument">
<p v-if="isGeolocation">{{ media.url }}</p>
<section v-else-if="isDocument">
<document-preview
@download="download"
:fullFilename="fullFilename"
Expand Down Expand Up @@ -80,6 +81,10 @@ export default {
const audio = /(mpeg3|wav|ogg)/;
return audio.test(this.media.content_type);
},
isGeolocation() {
const geolocation = /(geo)/;
return geolocation.test(this.media.content_type);
},
},
methods: {
Expand Down

0 comments on commit d9f62e6

Please sign in to comment.