-
-
Notifications
You must be signed in to change notification settings - Fork 583
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
Relations endpoint support #967
Conversation
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.
Looks good generally, but we should add docs first.
@@ -439,6 +439,27 @@ MatrixBaseApis.prototype.createRoom = function(options, callback) { | |||
); | |||
}; | |||
|
|||
MatrixBaseApis.prototype.fetchRelations = |
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.
Please add function docs like other functions here.
src/base-apis.js
Outdated
async function(roomId, eventId, relationType, eventType, opts) { | ||
const queryParams = {}; | ||
if (opts.token) { | ||
queryParams.from = opts.token; |
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.
I assume the name token
matches other APIs?
src/base-apis.js
Outdated
$relationType: relationType, | ||
$eventType: eventType, | ||
}); | ||
// valid options include: room_alias_name, visibility, invite |
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.
What does this means? Options for what...?
@@ -3965,6 +3965,20 @@ MatrixClient.prototype.getCanResetTimelineCallback = function() { | |||
return this._canResetTimelineCallback; | |||
}; | |||
|
|||
MatrixClient.prototype.relations = |
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 should also have function docs like others here.
Sorry for the messy initial state, should be better now. |
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.
Thanks! 😁
Needed for element-hq/element-web#9490
React-sdk PR: matrix-org/matrix-react-sdk#3144