@@ -112,10 +112,10 @@ internal class DefaultRealtimeObjects(internal val channelName: String, internal
112112 throw invalidInputError(" Map keys should not be empty" )
113113 }
114114
115- // RTO11f4 - Create initial value operation
115+ // RTO11f14 - Create initial value operation
116116 val initialMapValue = DefaultLiveMap .initialValue(entries)
117117
118- // RTO11f5 - Create initial value JSON string
118+ // RTO11f15 - Create initial value JSON string
119119 val initialValueJSONString = gson.toJson(initialMapValue)
120120
121121 // RTO11f8 - Create object ID from initial value
@@ -126,9 +126,11 @@ internal class DefaultRealtimeObjects(internal val channelName: String, internal
126126 operation = ObjectOperation (
127127 action = ObjectOperationAction .MapCreate ,
128128 objectId = objectId,
129- map = initialMapValue.map,
130- nonce = nonce,
131- initialValue = initialValueJSONString,
129+ mapCreateWithObjectId = MapCreateWithObjectId (
130+ nonce = nonce,
131+ initialValue = initialValueJSONString,
132+ derivedFrom = initialMapValue,
133+ ),
132134 )
133135 )
134136
@@ -148,9 +150,9 @@ internal class DefaultRealtimeObjects(internal val channelName: String, internal
148150 throw invalidInputError(" Counter value should be a valid number" )
149151 }
150152
151- // RTO12f2
153+ // RTO12f12
152154 val initialCounterValue = DefaultLiveCounter .initialValue(initialValue)
153- // RTO12f3 - Create initial value operation
155+ // RTO12f13 - Create initial value operation
154156 val initialValueJSONString = gson.toJson(initialCounterValue)
155157
156158 // RTO12f6- Create object ID from initial value
@@ -161,9 +163,11 @@ internal class DefaultRealtimeObjects(internal val channelName: String, internal
161163 operation = ObjectOperation (
162164 action = ObjectOperationAction .CounterCreate ,
163165 objectId = objectId,
164- counter = initialCounterValue.counter,
165- nonce = nonce,
166- initialValue = initialValueJSONString
166+ counterCreateWithObjectId = CounterCreateWithObjectId (
167+ nonce = nonce,
168+ initialValue = initialValueJSONString,
169+ derivedFrom = initialCounterValue,
170+ ),
167171 )
168172 )
169173
0 commit comments