matrix-org / gomatrix

A Golang Matrix client
Apache License 2.0
284 stars 53 forks source link

Add Option to Fetch Full States #32

Open NotAFile opened 7 years ago

NotAFile commented 7 years ago

Currently, there seems to be no way of fetching state with the default Syncer. You would need to essentially write your own Syncer.

NotAFile commented 7 years ago

Correction: you can get state events manually with code like this:

    content := struct {
        Name string `json:"name"`
    }{}

    client.StateEvent(rm.ID, "m.room.name", "", &content)

but it's not very elegant and you basically need to do the decoding yourself.