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

fix #9: 'text' type requests should not return null #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

guusdk
Copy link
Member

@guusdk guusdk commented Jan 20, 2024

The 'text' type request returns the last known 'status' (not 'show'). It's a bit dodgy that this takes the last known status when a user is offline (where other endpoints return a 'current' status). This behavior is not changed in this commit (warrants further investigation - it is cleary implemented intentionally).

When the status is absent, this endpoint returns a value null. The status is an optional element, not set by all clients. It is undesirable to have a 'null' value. This commit replaces it with an hardcoded value of 'Available', matching the implementation that hardcodedly sets 'Unavailable' for clients that are offline and do not have a 'last known' presence.

The 'text' type request returns the last known 'status' (not 'show'). It's a bit dodgy that this takes the last known status when a user is offline (where other endpoints return a 'current' status). This behavior is not changed in this commit (warrants further investigation - it is cleary implemented intentionally).

When the status is absent, this endpoint returns a value `null`. The status is an optional element, not set by all clients. It is undesirable to have a 'null' value. This commit replaces it with an hardcoded value of 'Available', matching the implementation that hardcodedly sets 'Unavailable' for clients that are offline _and_ do not have a 'last known' presence.
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

Successfully merging this pull request may close these issues.

None yet

1 participant