File tree Expand file tree Collapse file tree 6 files changed +10
-16
lines changed Expand file tree Collapse file tree 6 files changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ - (instancetype)initWithUserId:(NSString *)userId
4949 _desc = desc;
5050 _timeout = timeout;
5151 _isLive = isLive;
52- _assetType = MXEventAssetTypeLiveLocation ;
52+ _assetType = MXEventAssetTypeUser ;
5353 _timestamp = timestamp;
5454 _originalEvent = originalEvent;
5555 }
@@ -122,7 +122,7 @@ + (id)modelFromJSON:(NSDictionary *)jsonDictionary
122122
123123 MXJSONModelSetString (assetTypeString, assetDictionary[kMXMessageContentKeyExtensibleAssetType ]);
124124
125- isAssetTypeValid = [assetTypeString isEqualToString: kMXMessageContentKeyExtensibleAssetTypeLiveLocation ];
125+ isAssetTypeValid = [assetTypeString isEqualToString: kMXMessageContentKeyExtensibleAssetTypeUser ];
126126 }
127127
128128 MXJSONModelSetNumber (timestampNumber, jsonDictionary[kMXMessageContentKeyExtensibleTimestampMSC3488 ])
@@ -144,7 +144,7 @@ + (id)modelFromJSON:(NSDictionary *)jsonDictionary
144144
145145 beaconInfo->_timestamp = [timestampNumber unsignedLongLongValue ];
146146
147- beaconInfo->_assetType = MXEventAssetTypeLiveLocation ;
147+ beaconInfo->_assetType = MXEventAssetTypeUser ;
148148 }
149149
150150 return beaconInfo;
@@ -166,7 +166,7 @@ - (NSDictionary *)JSONDictionary
166166 // Asset type
167167
168168 content[kMXMessageContentKeyExtensibleAssetMSC3488 ] = @{
169- kMXMessageContentKeyExtensibleAssetType : kMXMessageContentKeyExtensibleAssetTypeLiveLocation
169+ kMXMessageContentKeyExtensibleAssetType : kMXMessageContentKeyExtensibleAssetTypeUser
170170 };
171171
172172 return content;
Original file line number Diff line number Diff line change @@ -294,8 +294,6 @@ FOUNDATION_EXPORT NSString *const kMXMessageContentKeyExtensibleAssetMSC3488;
294294FOUNDATION_EXPORT NSString *const kMXMessageContentKeyExtensibleAssetType ;
295295FOUNDATION_EXPORT NSString *const kMXMessageContentKeyExtensibleAssetTypeUser ;
296296FOUNDATION_EXPORT NSString *const kMXMessageContentKeyExtensibleAssetTypePin ;
297- // live user location tracking
298- FOUNDATION_EXPORT NSString *const kMXMessageContentKeyExtensibleAssetTypeLiveLocation ;
299297
300298// Join Rules
301299
Original file line number Diff line number Diff line change 195195NSString *const kMXMessageContentKeyExtensibleAssetType = @" type" ;
196196NSString *const kMXMessageContentKeyExtensibleAssetTypeUser = @" m.self" ;
197197NSString *const kMXMessageContentKeyExtensibleAssetTypePin = @" m.pin" ;
198- NSString *const kMXMessageContentKeyExtensibleAssetTypeLiveLocation = @" m.self.live" ;
199198
200199// Join Rules
201200
Original file line number Diff line number Diff line change 1919typedef NS_ENUM (NSUInteger , MXEventAssetType )
2020{
2121 MXEventAssetTypeGeneric , // A generic location without context
22- MXEventAssetTypeUser , // Static user location
23- MXEventAssetTypePin , // Pin location (POI)
24- MXEventAssetTypeLiveLocation // User live location
22+ MXEventAssetTypeUser , // User location, it can be static or live depending of event type
23+ MXEventAssetTypePin // Pin location (POI)
2524};
Original file line number Diff line number Diff line change @@ -31,9 +31,7 @@ public class MXEventAssetTypeMapper: NSObject {
3131 case . pin:
3232 eventKey = kMXMessageContentKeyExtensibleAssetTypePin
3333 case . generic:
34- eventKey = " "
35- case . liveLocation:
36- eventKey = kMXMessageContentKeyExtensibleAssetTypeLiveLocation
34+ eventKey = " "
3735 @unknown default :
3836 eventKey = " "
3937 }
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class MXBeaconInfoUnitTests: XCTestCase {
3636 " live " : expectedIsLive,
3737 kMXMessageContentKeyExtensibleTimestampMSC3488: expectedTimestamp,
3838 kMXMessageContentKeyExtensibleAssetMSC3488: [
39- kMXMessageContentKeyExtensibleAssetType: kMXMessageContentKeyExtensibleAssetTypeLiveLocation
39+ kMXMessageContentKeyExtensibleAssetType: kMXMessageContentKeyExtensibleAssetTypeUser
4040 ]
4141 ]
4242
@@ -51,7 +51,7 @@ class MXBeaconInfoUnitTests: XCTestCase {
5151 XCTAssertEqual ( beaconInfo. timeout, expectedTimeout)
5252 XCTAssertEqual ( beaconInfo. isLive, expectedIsLive)
5353 XCTAssertEqual ( beaconInfo. timestamp, expectedTimestamp)
54- XCTAssertEqual ( beaconInfo. assetType, MXEventAssetType . liveLocation )
54+ XCTAssertEqual ( beaconInfo. assetType, MXEventAssetType . user )
5555 }
5656
5757 func testParsingFailMissingTimeout( ) throws {
@@ -65,7 +65,7 @@ class MXBeaconInfoUnitTests: XCTestCase {
6565 " live " : expectedIsLive,
6666 kMXMessageContentKeyExtensibleTimestampMSC3488: expectedTimestamp,
6767 kMXMessageContentKeyExtensibleAssetMSC3488: [
68- kMXMessageContentKeyExtensibleAssetType: kMXMessageContentKeyExtensibleAssetTypeLiveLocation
68+ kMXMessageContentKeyExtensibleAssetType: kMXMessageContentKeyExtensibleAssetTypeUser
6969 ]
7070 ]
7171
You can’t perform that action at this time.
0 commit comments