Skip to content

Commit

Permalink
element-hq/element-ios/issues/5120 - Keep old behavior for keys not c…
Browse files Browse the repository at this point in the history
…reated through json decoding.
  • Loading branch information
stefanceriu committed Nov 15, 2021
1 parent 310d647 commit 1c1d3cf
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions MatrixSDK/Crypto/Data/MXKey.m
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,26 @@ + (id)modelFromJSON:(NSDictionary *)JSONDictionary
- (NSDictionary *)JSONDictionary
{
NSDictionary *JSONDictionary;

NSString *keyFullId = self.keyFullId;
if (keyFullId && _value)
if (keyFullId && self.value)
{
JSONDictionary = @{
keyFullId: _value
};
keyFullId: self.value
};
}
return JSONDictionary;
}

- (NSDictionary *)signalableJSONDictionary
{
if (_signalableJSONDictionary == nil) {
return @{ @"key": self.value };
}

return _signalableJSONDictionary;
}

- (NSString *)description
{
return self.JSONDictionary.description;
Expand Down

0 comments on commit 1c1d3cf

Please sign in to comment.