Skip to content

Commit

Permalink
Use nc/capabilities instead of OC.getCapabilities
Browse files Browse the repository at this point in the history
Signed-off-by: Georg Ehrke <[email protected]>
  • Loading branch information
georgehrke committed Aug 18, 2020
1 parent 31e69fc commit 0077831
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"dependencies": {
"@nextcloud/auth": "^1.2.3",
"@nextcloud/axios": "^1.3.2",
"@nextcloud/capabilities": "^1.0.2",
"@nextcloud/dialogs": "^1.3.0",
"@nextcloud/event-bus": "^1.1.4",
"@nextcloud/l10n": "^1.2.3",
Expand Down
3 changes: 2 additions & 1 deletion src/mixins/userStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/
import axios from '@nextcloud/axios'
import { generateOcsUrl } from '@nextcloud/router'
import { getCapabilities } from '@nextcloud/capabilities'

export default {
data() {
Expand All @@ -41,7 +42,7 @@ export default {
* @returns {Promise<void>}
*/
async fetchUserStatus(userId) {
const capabilities = OC.getCapabilities()
const capabilities = getCapabilities()
if (!Object.prototype.hasOwnProperty.call(capabilities, 'user_status') || !capabilities['user_status'].enabled) {
return
}
Expand Down

0 comments on commit 0077831

Please sign in to comment.