Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix: Presence only comes online when UserActivity interrupted activity
Browse files Browse the repository at this point in the history
  • Loading branch information
bwindels committed Dec 11, 2018
1 parent 2608c31 commit f856a64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Presence.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
1 change: 1 addition & 0 deletions src/UserActivity.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'});
Expand Down

0 comments on commit f856a64

Please sign in to comment.