1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-07 10:46:24 +03:00

Merge branch 'develop' into travis/remove-presence

This commit is contained in:
Travis Ralston
2018-04-11 15:17:28 -06:00
246 changed files with 16884 additions and 4954 deletions

View File

@@ -1,5 +1,6 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2018 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -31,7 +32,7 @@ class Presence {
this.running = true;
if (undefined === this.state) {
this._resetTimer();
this.dispatcherRef = dis.register(this._onUserActivity.bind(this));
this.dispatcherRef = dis.register(this._onAction.bind(this));
}
}
@@ -95,8 +96,10 @@ class Presence {
this.setState("unavailable");
}
_onUserActivity() {
this._resetTimer();
_onAction(payload) {
if (payload.action === "user_activity") {
this._resetTimer();
}
}
/**