We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7618fc1 + d848cf0 commit e4ba3a1Copy full SHA for e4ba3a1
src/mixins/userStatus.js
@@ -22,6 +22,7 @@
22
import axios from '@nextcloud/axios'
23
import { generateOcsUrl } from '@nextcloud/router'
24
import { getCapabilities } from '@nextcloud/capabilities'
25
+import { getCurrentUser } from '@nextcloud/auth'
26
27
export default {
28
data() {
@@ -47,6 +48,11 @@ export default {
47
48
return
49
}
50
51
+ // User status endpoint is not available for guests.
52
+ if (!getCurrentUser()) {
53
+ return
54
+ }
55
+
56
try {
57
const { data } = await axios.get(generateOcsUrl('apps/user_status/api/v1', 2) + `statuses/${encodeURIComponent(userId)}`)
58
const {
0 commit comments