daydream

A small matrix web client written in rust
git clone git://archive.git.mtrnord.blog/daydream-mx/daydream.git
Log | Files | Refs | README | LICENSE

commit 7ea08c596e65305aec68beeddad8c6210f8a6447
parent 7f336487b2d1b67452f85fec5eae72a03022180a
Author: Marcel <mtrnord1@gmail.com>
Date:   Sat, 13 Jun 2020 21:37:21 +0200

Move SyncPing event to the correct position

Took 3 minutes

Diffstat:
M.github/workflows/tests.yml | 2+-
Mpackage.json | 3+--
Msrc/app/matrix/sync.rs | 6+++---
3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml @@ -2,7 +2,7 @@ name: E2E Tests on: [push] jobs: chrome: - runs-on: ubuntu-16.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: cypress-io/github-action@v1 diff --git a/package.json b/package.json @@ -3,8 +3,7 @@ "scripts": { "test": "yarn run test:chrome", "test:chrome": "start-server-and-test start http-get://localhost:8888 cy:run", - "test:firefox": "start-server-and-test dummy http-get://localhost:8888 cy:run:firefox", - "dummy": "date", + "test:firefox": "start-server-and-test start http-get://localhost:8888 cy:run:firefox", "build:dev": "webpack --mode development", "build": "webpack --mode production", "start:dev": "webpack-dev-server --mode development", diff --git a/src/app/matrix/sync.rs b/src/app/matrix/sync.rs @@ -31,10 +31,10 @@ impl Sync { async fn on_sync_response(&self, response: SyncResponse) { debug!("got sync!"); + // FIXME: Is there a smarter way? + let resp = Response::SyncPing; + self.callback.emit(resp); for (room_id, room) in response.rooms.join { - // FIXME: Is there a smarter way? - let resp = Response::SyncPing; - self.callback.emit(resp); for event in room.timeline.events { if let Ok(event) = event.deserialize() { self.on_room_message(&room_id, event).await