From 408eba79152f5a90ef4209987ee509d004786da3 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 11 Dec 2018 16:25:48 +0100 Subject: [PATCH] Fix: Presence only comes online when UserActivity interrupted activity --- src/Presence.js | 2 +- src/UserActivity.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Presence.js b/src/Presence.js index f798b1220d..c36bbdd8be 100644 --- a/src/Presence.js +++ b/src/Presence.js @@ -70,7 +70,7 @@ class Presence { } _onAction(payload) { - if (payload.action === 'user_activity_start') { + if (payload.action === 'user_activity') { this.setState("online"); this._unavailableTimer.restart(); } diff --git a/src/UserActivity.js b/src/UserActivity.js index b706821eac..4e3667274c 100644 --- a/src/UserActivity.js +++ b/src/UserActivity.js @@ -129,6 +129,7 @@ class UserActivity { this.lastScreenY = event.screenY; } + dis.dispatch({action: 'user_activity'}); if (!this._activityTimeout.isRunning()) { this._activityTimeout.start(); dis.dispatch({action: 'user_activity_start'});