This repository was archived by the owner on Apr 9, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 11Pod ::Spec . new do |s |
22 s . name = "AxolotlKit"
3- s . version = "0.6"
3+ s . version = "0.6.1 "
44 s . summary = "AxolotlKit is a Free implementation of the Axolotl protocol in Objective-C"
55 s . homepage = "https://github.com/WhisperSystems/AxolotlKit"
66 s . license = "GPLv2"
Original file line number Diff line number Diff line change 2727
2828- (NSData *)decrypt : (id <CipherMessage>)whisperMessage ;
2929
30+ - (int )remoteRegistrationId ;
31+ - (int )sessionVersion ;
32+
3033@end
Original file line number Diff line number Diff line change @@ -267,4 +267,24 @@ + (NSData*)currentProtocolVersion{
267267}
268268
269269
270+ - (int )remoteRegistrationId {
271+ SessionRecord *record = [self .sessionStore loadSession: self .recipientId deviceId: _deviceId];
272+
273+ if (!record) {
274+ @throw [NSException exceptionWithName: NoSessionException reason: @" Trying to get registration Id of a non-existing session." userInfo: nil ];
275+ }
276+
277+ return record.sessionState .remoteRegistrationId ;
278+ }
279+
280+ - (int )sessionVersion {
281+ SessionRecord *record = [self .sessionStore loadSession: self .recipientId deviceId: _deviceId];
282+
283+ if (!record) {
284+ @throw [NSException exceptionWithName: NoSessionException reason: @" Trying to get the version of a non-existing session." userInfo: nil ];
285+ }
286+
287+ return record.sessionState .version ;
288+ }
289+
270290@end
You can’t perform that action at this time.
0 commit comments