-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Added wrapper with pagination support for room hierarchy endpoint #100
Conversation
…ror and a wrapper for the GET /v1/rooms/:roomid/hierarchy endpoint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nice pr I sure hope tulir will add it...
// when it encounters another space as a child it recurses into that space before returning non-space children. | ||
// | ||
// NOTE: Only the roomID is required, the rest of the fields are optional and ignored if left to default values. | ||
func (cli *Client) Hierarchy(roomID id.RoomID, from string, max_depth int, suggested_only bool, limit int) (resp *RespHierarchy, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go variables should be camelCase.
func (cli *Client) Hierarchy(roomID id.RoomID, from string, max_depth int, suggested_only bool, limit int) (resp *RespHierarchy, err error) { | |
func (cli *Client) Hierarchy(roomID id.RoomID, from string, maxDepth int, suggestedOnly bool, limit int) (resp *RespHierarchy, err error) { |
|
||
type StrippedChildStateEvent struct { | ||
Content json.RawMessage `json:"content"` | ||
OriginServerTs int64 `json:"origin_server_ts"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally this has been aliased to Timestamp
elsewhere in mautrix-go.
OriginServerTs int64 `json:"origin_server_ts"` | |
Timestamp int64 `json:"origin_server_ts"` |
OriginServerTs int64 `json:"origin_server_ts"` | ||
Sender id.UserID `json:"sender"` | ||
StateKey string `json:"state_key"` | ||
Type string `json:"type"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this needs to be
Type string `json:"type"` | |
Type event.Type `json:"type"` |
but I am not quite sure.
This addresses issue #91