summaryrefslogtreecommitdiffstats
path: root/src/App.vue
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-08-15 12:56:29 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-08-15 12:56:29 -0100
commit135bb96694326fdc88dbae97513d4370d334f9bf (patch)
tree77d843c9f7549f6bc44d6bd2a5e1951bfc0ed5d0 /src/App.vue
parent3b2942f3eed9b59a92c60d7f605a10622bf0810b (diff)
update if on the right timeline
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'src/App.vue')
-rw-r--r--src/App.vue17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/App.vue b/src/App.vue
index ea008365..900af13b 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -210,6 +210,9 @@ export default {
this.$store.dispatch('fetchCurrentAccountInfo', this.cloudId)
}
+ if (OCA.Stratos && OCA.Stratos.isEnabled()) {
+ OCA.Stratos.addCallback(this.fromStratos, 'social')
+ }
},
methods: {
hideInfo() {
@@ -226,6 +229,20 @@ export default {
},
resetSearch() {
this.searchTerm = ''
+ },
+ fromStratos: function(data) {
+ // FIXME: might be better to use Timeline.type() ?
+ let timeline = 'home'
+ if (this.$route.params.type) {
+ timeline = this.$route.params.type
+ }
+
+ if (data.source === 'timeline.home' && timeline === 'home') {
+ this.$store.dispatch('addToTimeline', [data.payload])
+ }
+ if (data.source === 'timeline.direct' && timeline === 'direct') {
+ this.$store.dispatch('addToTimeline', [data.payload])
+ }
}
}
}