Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile page #1

Closed
3 tasks done
tobiasKaminsky opened this issue Oct 14, 2021 · 1 comment
Closed
3 tasks done

Profile page #1

tobiasKaminsky opened this issue Oct 14, 2021 · 1 comment

Comments

@tobiasKaminsky
Copy link
Member

tobiasKaminsky commented Oct 14, 2021

On click on each avatar user should have links to

  • profile: opens (public profile) page in web browser (full-address)
  • mail: mailto link handled by OS
  • talk: either native app if installed or opens in web browser

🚨 It may be that profile is disabled globally, mail is not set and talk not installed
--> check this before and then say "No user actions available"

Server API: nextcloud/server#29269
Call: GET /ocs/v2.php/hovercard/v1/$userId

@nickvergessen
Copy link
Member

nickvergessen commented Oct 20, 2021

sample curl:

curl -k -u admin:admin \
    'https://nextcloud23.local/ocs/v2.php/hovercard/v1/{USER ID}?format=json' \
    -X GET \
    -H "OCS-APIRequest: true"

Sample response:

{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 200,
      "message": "OK"
    },
    "data": {
      "userId": "admin",
      "displayName": "Adam",
      "actions": [
        {
          "title": "View profile",
          "icon": "https://nextcloud23.local/core/img/actions/profile.svg",
          "hyperlink": "https://nextcloud23.local/index.php/u/admin",
          "appId": "profile"
        },
        {
          "title": "admin@example.tld",
          "icon": "https://nextcloud23.local/core/img/actions/mail.svg",
          "hyperlink": "mailto:admin@example.tld",
          "appId": "email"
        },
        {
          "title": "Talk to Adam",
          "icon": "https://nextcloud23.local/apps/spreed/img/app-dark.svg",
          "hyperlink": "https://nextcloud23.local/index.php/apps/spreed/?callUser=admin",
          "appId": "spreed"
        }
      ]
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants