-
Notifications
You must be signed in to change notification settings - Fork 5
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 endpoint to deactivate an account #143
Conversation
…message, completed deactivate and added tests for it, modified SafeClientEvent typing
…es from all tables
const insertDeletedPushersPromises = pushers.map(async (pusher) => { | ||
await limit(() => | ||
clientServer.matrixDb.insert('deleted_pushers', { | ||
stream_id: randomString(64), // TODO: Update when stream ordering is implemented since the stream_id has to keep track of the order of operations |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
eventRows[0].origin_server_ts !== null && | ||
eventRows[0].origin_server_ts !== undefined | ||
? (eventRows[0].origin_server_ts as number) | ||
: 0, // TODO : Discuss default value |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
sender: | ||
eventRows[0] !== null && eventRows[0] !== undefined | ||
? (eventRows[0].sender as string) | ||
: '', // TODO : Discuss default value |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
}) | ||
} | ||
// await updateMembership(room, userId, Membership.LEAVE) | ||
// TODO : Replace this after implementing method to update room membership from the spec |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
clientServer: MatrixClientServer, | ||
userId: string | ||
): Promise<void> => { | ||
// TODO : Implement this after implementing endpoint '/_matrix/client/v3/rooms/{roomId}/leave' from the spec at : https://spec.matrix.org/v1.11/client-server-api/#post_matrixclientv3roomsroomidleave |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
@@ -63,6 +63,7 @@ | |||
} | |||
clientServer.matrixDb | |||
.updateWithConditions( | |||
// TODO : Replace with upsert |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
@@ -165,6 +165,16 @@ | |||
ip, | |||
user_agent: userAgent | |||
}) | |||
const newDeviceAuthProviderPromise = clientServer.matrixDb.insert( | |||
// TODO : Fill the auth_provider_id and auth_provider_session_id rows with the right values after implementing SSO login |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
@@ -388,6 +409,9 @@ | |||
} | |||
) | |||
} else { | |||
// We don't handle the threepid_guest_access_tokens table and give the guest an access token like any user. | |||
// This might be problematic to restrict the endpoints guests have access to as specified in the spec | |||
// TODO : Review this after implementing endpoints not available to guest accounts. Maybe modify the authenticate function. |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
Added this endpoint from the spec : https://spec.matrix.org/v1.11/client-server-api/#post_matrixclientv3accountdeactivate
e/err
bye/err.toString()
so that the logger logs the error message received./register
for the future and added feature to fill new database tables with device information./whoami
tests to new file account.test.ts along with the new tests to/deactivate
endpoint./leave
endpoint in the future.