matrix-org / matrix-org/matrix-js-sdk

Improve SDK use with guest accounts

Open
#998 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.2k
Forks
704
Avg merge
1d 20h
Merged PRs (30d)
40

Description

I was testing the sdk to do something silly with guest accounts but the client won't sync due to trying to query `/_matrix/client/r0/pushrules/`, which returns:

{"errcode":"M_GUEST_ACCESS_FORBIDDEN","error":"Guest access not allowed"}

Does this mean the SDK can't be used for guest accounts? is it a bug?
FWIW, I'd create a PR and add an example for #430

In a nutshell the way I am using the SDK is:

* `client = matrixcs.createClient(opts)`
* If necessary:
* `client.registerGuest()`
* `client = matrixcs.createClient(opts)`
* `client.startClient()`

Contributor guide

Open the contributing guide

Research direction

Start by tracing the createClient, registerGuest, and startClient flow to the request for /_matrix/client/r0/pushrules/. Confirm how guest synchronization currently handles the M_GUEST_ACCESS_FORBIDDEN response, then verify that a guest client can start without the forbidden request and that the behavior is covered by an appropriate test or example.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.