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

Improved "getting events for a room" #132

Merged
merged 2 commits into from
Jul 25, 2024
Merged

Conversation

@Mathixx Mathixx requested a review from guimard July 24, 2024 10:52
const roomId: string = (req as Request).params.roomId
const eventType = (req as Request).params.eventType
const stateKey = (req as Request).params.stateKey
// TODO : add check for eventType

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
* Following the spec and Synapse implementation of the matrix Protocol, we have decided that when the requesting user
* left the room, he will have access solely to the event of his departure.
*
* TODO : eventually add check for eventType to prevent invalid requests in the database

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
/* istanbul ignore next */
send(res, 500, errMsg('unknown', err))
})
// TODO : eventually serialize the event before sending it to client as done in Synapse implementation

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
clientServer.authenticate(req, res, (token) => {
const requesterUid = token.sub

// TODO : eventually add redirection with federation here

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
epoch() -
(eventResult[0].events_origin_server_ts as number),
prev_content: eventResult[0].events_prev_content
// TODO : Add more unsigned data cf https://spec.matrix.org/latest/client-server-api/#get_matrixclientv3roomsroomidstate

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
const unsigned = {
age: epoch() - (eventResult[0].origin_server_ts as number),
prev_content: eventResult[0].prev_content
// TODO : Add more unsigned data cf https://spec.matrix.org/latest/client-server-api/#get_matrixclientv3roomsroomidstate

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
* Following the spec and Synapse implementation of the matrix Protocol, we have decided that when the requesting user
* left the room, he will have access solely to the event of his departure.
*
* TODO : eventually add check for eventType to prevent invalid requests in the database

Check notice

Code scanning / devskim

A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note

Suspicious comment
@guimard guimard merged commit a73780c into full-id-service Jul 25, 2024
8 checks passed
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.

2 participants