Fix: Presence only comes online when UserActivity interrupted activity
This commit is contained in:
parent
2b0c2eff1e
commit
408eba7915
2 changed files with 2 additions and 1 deletions
|
@ -70,7 +70,7 @@ class Presence {
|
||||||
}
|
}
|
||||||
|
|
||||||
_onAction(payload) {
|
_onAction(payload) {
|
||||||
if (payload.action === 'user_activity_start') {
|
if (payload.action === 'user_activity') {
|
||||||
this.setState("online");
|
this.setState("online");
|
||||||
this._unavailableTimer.restart();
|
this._unavailableTimer.restart();
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,6 +129,7 @@ class UserActivity {
|
||||||
this.lastScreenY = event.screenY;
|
this.lastScreenY = event.screenY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dis.dispatch({action: 'user_activity'});
|
||||||
if (!this._activityTimeout.isRunning()) {
|
if (!this._activityTimeout.isRunning()) {
|
||||||
this._activityTimeout.start();
|
this._activityTimeout.start();
|
||||||
dis.dispatch({action: 'user_activity_start'});
|
dis.dispatch({action: 'user_activity_start'});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue