From 52c0d849d731de945f3deafabea4141705543d88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=83=D8=A7=D8=B1=D9=84=20=D9=85=D8=A8=D8=A7=D8=B1=D9=83?= Date: Thu, 15 Jul 2021 13:59:42 +0200 Subject: [PATCH] mesge retrieve limit uppe to 1000 --- front/src/App.vue | 5 +++-- front/src/api/zulip/index.js | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/front/src/App.vue b/front/src/App.vue index 6d8ad62..d69e5c4 100644 --- a/front/src/App.vue +++ b/front/src/App.vue @@ -40,7 +40,7 @@ export default { this.$store.commit("setMobile", this.checkIfMobile()); }); - this.$router.beforeEach(async (to) => { + this.$router.beforeEach(async () => { if (!this.zulipClient || this.streams.length == 0) { await this.getStreams() } @@ -62,10 +62,11 @@ export default { checkIfMobile: () => window.innerWidth < 700, getStreams() { - return new Promise((resolve) => { + return new Promise(resolve => { api.zulip.init().then((client) => { this.zulipClient = client; api.zulip.getStreams(client).then((result) => { + console.log(result.streams) this.$store.commit( "setStreams", result.streams.filter((s) => s.name.startsWith(this.pubStr)) diff --git a/front/src/api/zulip/index.js b/front/src/api/zulip/index.js index 82fc02e..1c90a08 100644 --- a/front/src/api/zulip/index.js +++ b/front/src/api/zulip/index.js @@ -31,8 +31,8 @@ const .messages .retrieve(params || { anchor: "newest", - num_before: 100, - num_after: 0, + // num_before: 100, + // num_after: 0, // apply_markdown: false, narrow: [ { operator: "stream", operand: stream }, @@ -50,7 +50,7 @@ const .messages .retrieve(params || { anchor: "newest", - num_before: 100, + num_before: 1000, num_after: 0, // apply_markdown: false, narrow: [{ operator: "stream", operand: stream }],