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

setPresenceStatus: status_msg defaults to undefined #218

Merged
merged 4 commits into from May 29, 2022

Conversation

jaller94
Copy link
Contributor

Fixes #79
Fixes matrix-org/matrix-appservice-discord#591

Correct according to Matrix Spec 1.2: https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3presenceuseridstatus

Sidenote: On the Matrix Spec the type of msg_type's type is [string null] for the HTTP GET method. Maybe that's were the confusion came from.
https://spec.matrix.org/v1.2/client-server-api/#get_matrixclientv3presenceuseridstatus

Copy link
Owner

@turt2live turt2live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise lgtm

this should also get a test if it doesn't have one please :)

the longer history on the status_msg is a long-term belief of mine that the spec should accept or declare nullability on fields, and synapse is probably in the wrong for validating this so strictly.

src/MatrixClient.ts Outdated Show resolved Hide resolved
Christian Paul and others added 2 commits May 20, 2022 11:28
@jaller94 jaller94 requested a review from turt2live May 20, 2022 09:31
test/MatrixClientTest.ts Outdated Show resolved Hide resolved
@turt2live turt2live merged commit 8f60493 into turt2live:master May 29, 2022
@jaller94 jaller94 deleted the patch-1 branch August 26, 2022 22:46
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.

Presence spews status_msg errors setPresenceStatus status_msg defaults to null
2 participants