fix: capture whatsapp events
This commit is contained in:
parent
7bbe62de15
commit
4159bb6196
@ -170,9 +170,9 @@ import DoubleCheckIcon from '@/components/Icons/DoubleCheckIcon.vue'
|
||||
import DocumentIcon from '@/components/Icons/DocumentIcon.vue'
|
||||
import ReactIcon from '@/components/Icons/ReactIcon.vue'
|
||||
import { dateFormat } from '@/utils'
|
||||
import { capture } from '@/telemetry'
|
||||
import { Tooltip, Dropdown, createResource } from 'frappe-ui'
|
||||
import { ref } from 'vue'
|
||||
import FeatherIcon from 'frappe-ui/src/components/FeatherIcon.vue'
|
||||
|
||||
const props = defineProps({
|
||||
messages: Array,
|
||||
@ -219,6 +219,7 @@ function reactOnMessage(name, emoji) {
|
||||
},
|
||||
auto: true,
|
||||
onSuccess() {
|
||||
capture('whatsapp_react_on_message')
|
||||
list.value.reload()
|
||||
},
|
||||
})
|
||||
|
||||
@ -39,6 +39,7 @@
|
||||
() => {
|
||||
content += emoji
|
||||
$refs.textarea.$el.focus()
|
||||
capture('whatsapp_emoji_added')
|
||||
}
|
||||
"
|
||||
>
|
||||
@ -65,8 +66,8 @@
|
||||
<script setup>
|
||||
import IconPicker from '@/components/IconPicker.vue'
|
||||
import SmileIcon from '@/components/Icons/SmileIcon.vue'
|
||||
import { capture } from '@/telemetry'
|
||||
import { createResource, Textarea, FileUploader, Dropdown } from 'frappe-ui'
|
||||
import FeatherIcon from 'frappe-ui/src/components/FeatherIcon.vue'
|
||||
import { ref, nextTick, watch } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
@ -92,6 +93,7 @@ function uploadFile(file) {
|
||||
whatsapp.value.attach = file.file_url
|
||||
whatsapp.value.content_type = fileType.value
|
||||
sendWhatsAppMessage()
|
||||
capture('whatsapp_upload_file')
|
||||
}
|
||||
|
||||
function sendTextMessage(event) {
|
||||
@ -99,6 +101,7 @@ function sendTextMessage(event) {
|
||||
sendWhatsAppMessage()
|
||||
textarea.value.$el.blur()
|
||||
content.value = ''
|
||||
capture('whatsapp_send_message')
|
||||
}
|
||||
|
||||
async function sendWhatsAppMessage() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user