-
Notifications
You must be signed in to change notification settings - Fork 216
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
MXTaggedEvents: Expose "m.tagged_events" according to (MSC2437) #959
Conversation
57263b2
to
aef2ccd
Compare
|
||
jsonDictionary[kTaggedEventInfoKewordsJSONKey] = _keywords; | ||
jsonDictionary[kTaggedEventInfoOriginServerTsJSONKey] = @(_originServerTs); | ||
jsonDictionary[kTaggedEventInfoTaggedAtJSONKey] = @(_taggedAt); |
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.
I would check whether each value is actually defined before adding them to the dict
NSMutableDictionary<NSString*, NSDictionary<NSString*, NSDictionary*>* > *updatedTags = [_tags mutableCopy]; | ||
if (!updatedTags) | ||
{ | ||
updatedTags = [NSMutableDictionary dictionary]; |
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.
I would not allocate this dictionary here. I would not change/update _tags
} | ||
} | ||
|
||
_tags = updatedTags; |
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.
I would update _tags
only in case of an actual change
MatrixSDK/Utils/MXTools.m
Outdated
@@ -116,6 +116,7 @@ + (void)initialize | |||
kMXEventTypeStringSecretRequest, | |||
kMXEventTypeStringSecretSend, | |||
kMXEventTypeStringSecretStorageDefaultKey, | |||
kMXEventTypeStringTaggedEvents, |
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.
We should remove the last comma
27b6a71
to
0035edf
Compare
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.
LGTM
MSC: matrix-org/matrix-spec-proposals#2437