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

Add API endpoint to get online/offline/away/idle status, plus away message if possible #42

Closed
CoherentLogic opened this issue Jun 18, 2024 · 2 comments · Fixed by #61
Closed
Labels
enhancement New feature or request

Comments

@CoherentLogic
Copy link

Description of the feature

Management API endpoint that can, for a given screen name, retrieve:

  • Offline/online state
  • Idle state
  • Idle duration
  • Away state
  • Away message

Use case

This would be useful in the ChivaNet environment for further integration with the ChivaNet website, RAS directory, and presence API. I assume it could be used similarly by other operators.

@mk6i mk6i added the enhancement New feature or request label Jun 18, 2024
@jgknight
Copy link
Contributor

Would it be acceptable to add these to the /sessions endpoint? I have a change in-progress that adds the following fields to the /sessions endpoint

  • away_message - contents of their away message
  • idle_seconds - how many seconds they have been idle
  • online_seconds - how many seconds they have been online

Then to address the states,

  • For online state you can assume if the screen name is present in /sessions, they are online
  • For idle state you can assume if idle_seconds > 0, they are idle
  • For away state you can assume if away_message is not blank, they are away

I think it'd also be cool to update the /users endpoint so you could get /user/XXX and see their profile and buddy icon. This would also be a good spot to (in the future) return their privacy settings so you could control whether their presense etc should show up on the chivanet directory page.

@CoherentLogic
Copy link
Author

That works for me!

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

Successfully merging a pull request may close this issue.

3 participants