Skip to content

Commit bdc87df

Browse files
committed
Webhook poll when SMS is received
1 parent a083889 commit bdc87df

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

web/layouts/default.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ export default class DefaultLayout extends Vue {
5050
channel.bind('phone.updated', () => {
5151
this.canPoll = true
5252
})
53+
channel.bind('message.phone.received', () => {
54+
this.canPoll = true
55+
})
5356
5457
this.startPoller()
5558
}, 10_000) // delay so that the auth user is present
@@ -73,8 +76,9 @@ export default class DefaultLayout extends Vue {
7376
if (this.$store.getters.getAuthUser && this.$store.getters.getOwner) {
7477
setAuthHeader((await this.$fire.auth.currentUser?.getIdToken()) ?? '')
7578
promises.push(
76-
promises.push(this.$store.dispatch('loadPhones', true)),
79+
this.$store.dispatch('loadPhones', true),
7780
this.$store.dispatch('loadThreads'),
81+
this.$store.dispatch('loadMessages'),
7882
this.$store.dispatch('getHeartbeat'),
7983
)
8084
}

0 commit comments

Comments
 (0)