-
Notifications
You must be signed in to change notification settings - Fork 214
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
MXCrypto: Use the last olm session that got a message #611
Conversation
…sion objects from OLMKit
With the add MXOlmSession.lastReceivedMessageTs element-hq/element-ios#2128
MXRealmOlmSession *realmOlmSession = [MXRealmOlmSession objectsInRealm:self.realm | ||
where:@"sessionId = %@ AND deviceKey = %@", sessionId, deviceKey].firstObject; | ||
|
||
OLMSession *olmSession = [NSKeyedUnarchiver unarchiveObjectWithData:realmOlmSession.olmSessionData]; |
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.
- [NSKeyedUnarchiver unarchiveObjectWithData]
take a non null argument. Verify realmOlmSession
nullability before.
Fix Steve's comment
device. | ||
|
||
@param deviceKey the public key of the other device. | ||
@return {object} A map from sessionId to Base64 end-to-end session. | ||
@return a array of end-to-end sessions sorted by the last updated first. |
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.
Wrong comment?
device sorted by `lastReceivedMessageTs`, the most recent(higest value) first. | ||
|
||
@param deviceKey the public key of the other device. | ||
@return a array of end-to-end sessions. |
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.
result is sorted (comments mixed up)
|
||
/** | ||
Retrieve all end-to-end sessions between the logged-in user and another | ||
device sorted by `lastReceivedMessageTs`, the most recent(higest value) first. |
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.
typo: highest
fixes element-hq/element-ios#2128.