Reverting usage of some stable fields whereas related MSCs have not landed into the specs yet

This commit is contained in:
Maxime NATUREL 2022-12-08 17:41:29 +01:00
parent ee737025f2
commit 220b1d86c0
9 changed files with 15 additions and 15 deletions

View file

@ -46,7 +46,7 @@ internal class DefaultStartLiveLocationShareTask @Inject constructor(
isLive = true, isLive = true,
unstableTimestampMillis = clock.epochMillis() unstableTimestampMillis = clock.epochMillis()
).toContent() ).toContent()
val eventType = EventType.STATE_ROOM_BEACON_INFO.stable val eventType = EventType.STATE_ROOM_BEACON_INFO.unstable
val sendStateTaskParams = SendStateTask.Params( val sendStateTaskParams = SendStateTask.Params(
roomId = params.roomId, roomId = params.roomId,
stateKey = userId, stateKey = userId,

View file

@ -45,7 +45,7 @@ internal class DefaultStopLiveLocationShareTask @Inject constructor(
val sendStateTaskParams = SendStateTask.Params( val sendStateTaskParams = SendStateTask.Params(
roomId = params.roomId, roomId = params.roomId,
stateKey = stateKey, stateKey = stateKey,
eventType = EventType.STATE_ROOM_BEACON_INFO.stable, eventType = EventType.STATE_ROOM_BEACON_INFO.unstable,
body = updatedContent body = updatedContent
) )
return try { return try {

View file

@ -181,7 +181,7 @@ internal class LocalEchoEventFactory @Inject constructor(
originServerTs = dummyOriginServerTs(), originServerTs = dummyOriginServerTs(),
senderId = userId, senderId = userId,
eventId = localId, eventId = localId,
type = EventType.POLL_START.stable, type = EventType.POLL_START.unstable,
content = newContent.toContent().plus(additionalContent.orEmpty()) content = newContent.toContent().plus(additionalContent.orEmpty())
) )
} }
@ -206,7 +206,7 @@ internal class LocalEchoEventFactory @Inject constructor(
originServerTs = dummyOriginServerTs(), originServerTs = dummyOriginServerTs(),
senderId = userId, senderId = userId,
eventId = localId, eventId = localId,
type = EventType.POLL_RESPONSE.stable, type = EventType.POLL_RESPONSE.unstable,
content = content.toContent().plus(additionalContent.orEmpty()), content = content.toContent().plus(additionalContent.orEmpty()),
unsignedData = UnsignedData(age = null, transactionId = localId) unsignedData = UnsignedData(age = null, transactionId = localId)
) )
@ -226,7 +226,7 @@ internal class LocalEchoEventFactory @Inject constructor(
originServerTs = dummyOriginServerTs(), originServerTs = dummyOriginServerTs(),
senderId = userId, senderId = userId,
eventId = localId, eventId = localId,
type = EventType.POLL_START.stable, type = EventType.POLL_START.unstable,
content = content.toContent().plus(additionalContent.orEmpty()), content = content.toContent().plus(additionalContent.orEmpty()),
unsignedData = UnsignedData(age = null, transactionId = localId) unsignedData = UnsignedData(age = null, transactionId = localId)
) )
@ -249,7 +249,7 @@ internal class LocalEchoEventFactory @Inject constructor(
originServerTs = dummyOriginServerTs(), originServerTs = dummyOriginServerTs(),
senderId = userId, senderId = userId,
eventId = localId, eventId = localId,
type = EventType.POLL_END.stable, type = EventType.POLL_END.unstable,
content = content.toContent().plus(additionalContent.orEmpty()), content = content.toContent().plus(additionalContent.orEmpty()),
unsignedData = UnsignedData(age = null, transactionId = localId) unsignedData = UnsignedData(age = null, transactionId = localId)
) )
@ -300,7 +300,7 @@ internal class LocalEchoEventFactory @Inject constructor(
originServerTs = dummyOriginServerTs(), originServerTs = dummyOriginServerTs(),
senderId = userId, senderId = userId,
eventId = localId, eventId = localId,
type = EventType.BEACON_LOCATION_DATA.stable, type = EventType.BEACON_LOCATION_DATA.unstable,
content = content.toContent().plus(additionalContent.orEmpty()), content = content.toContent().plus(additionalContent.orEmpty()),
unsignedData = UnsignedData(age = null, transactionId = localId) unsignedData = UnsignedData(age = null, transactionId = localId)
) )

View file

@ -87,7 +87,7 @@ object PollEventsTestData {
) )
internal val A_POLL_START_EVENT = Event( internal val A_POLL_START_EVENT = Event(
type = EventType.POLL_START.stable, type = EventType.POLL_START.unstable,
eventId = AN_EVENT_ID, eventId = AN_EVENT_ID,
originServerTs = 1652435922563, originServerTs = 1652435922563,
senderId = A_USER_ID_1, senderId = A_USER_ID_1,
@ -96,7 +96,7 @@ object PollEventsTestData {
) )
internal val A_POLL_RESPONSE_EVENT = Event( internal val A_POLL_RESPONSE_EVENT = Event(
type = EventType.POLL_RESPONSE.stable, type = EventType.POLL_RESPONSE.unstable,
eventId = AN_EVENT_ID, eventId = AN_EVENT_ID,
originServerTs = 1652435922563, originServerTs = 1652435922563,
senderId = A_USER_ID_1, senderId = A_USER_ID_1,
@ -105,7 +105,7 @@ object PollEventsTestData {
) )
internal val A_POLL_END_EVENT = Event( internal val A_POLL_END_EVENT = Event(
type = EventType.POLL_END.stable, type = EventType.POLL_END.unstable,
eventId = AN_EVENT_ID, eventId = AN_EVENT_ID,
originServerTs = 1652435922563, originServerTs = 1652435922563,
senderId = A_USER_ID_1, senderId = A_USER_ID_1,

View file

@ -69,7 +69,7 @@ class DefaultGetActiveBeaconInfoForUserTaskTest {
result shouldBeEqualTo currentStateEvent result shouldBeEqualTo currentStateEvent
fakeStateEventDataSource.verifyGetStateEvent( fakeStateEventDataSource.verifyGetStateEvent(
roomId = params.roomId, roomId = params.roomId,
eventType = EventType.STATE_ROOM_BEACON_INFO.stable, eventType = EventType.STATE_ROOM_BEACON_INFO.unstable,
stateKey = QueryStringValue.Equals(A_USER_ID) stateKey = QueryStringValue.Equals(A_USER_ID)
) )
} }

View file

@ -75,7 +75,7 @@ internal class DefaultStartLiveLocationShareTaskTest {
val expectedParams = SendStateTask.Params( val expectedParams = SendStateTask.Params(
roomId = params.roomId, roomId = params.roomId,
stateKey = A_USER_ID, stateKey = A_USER_ID,
eventType = EventType.STATE_ROOM_BEACON_INFO.stable, eventType = EventType.STATE_ROOM_BEACON_INFO.unstable,
body = expectedBeaconContent body = expectedBeaconContent
) )
fakeSendStateTask.verifyExecuteRetry( fakeSendStateTask.verifyExecuteRetry(

View file

@ -79,7 +79,7 @@ class DefaultStopLiveLocationShareTaskTest {
val expectedSendParams = SendStateTask.Params( val expectedSendParams = SendStateTask.Params(
roomId = params.roomId, roomId = params.roomId,
stateKey = A_USER_ID, stateKey = A_USER_ID,
eventType = EventType.STATE_ROOM_BEACON_INFO.stable, eventType = EventType.STATE_ROOM_BEACON_INFO.unstable,
body = expectedBeaconContent body = expectedBeaconContent
) )
fakeSendStateTask.verifyExecuteRetry( fakeSendStateTask.verifyExecuteRetry(

View file

@ -79,7 +79,7 @@ class LiveLocationShareRedactionEventProcessorTest {
@Test @Test
fun `given a redacted live location share event when processing it then related summaries are deleted from database`() = runTest { fun `given a redacted live location share event when processing it then related summaries are deleted from database`() = runTest {
val event = Event(eventId = AN_EVENT_ID, redacts = A_REDACTED_EVENT_ID) val event = Event(eventId = AN_EVENT_ID, redacts = A_REDACTED_EVENT_ID)
val redactedEventEntity = EventEntity(eventId = A_REDACTED_EVENT_ID, type = EventType.STATE_ROOM_BEACON_INFO.stable) val redactedEventEntity = EventEntity(eventId = A_REDACTED_EVENT_ID, type = EventType.STATE_ROOM_BEACON_INFO.unstable)
fakeRealm.givenWhere<EventEntity>() fakeRealm.givenWhere<EventEntity>()
.givenEqualTo(EventEntityFields.EVENT_ID, A_REDACTED_EVENT_ID) .givenEqualTo(EventEntityFields.EVENT_ID, A_REDACTED_EVENT_ID)
.givenFindFirst(redactedEventEntity) .givenFindFirst(redactedEventEntity)

View file

@ -63,7 +63,7 @@ object FakeCreatePollViewStates {
) )
private val A_POLL_START_EVENT = Event( private val A_POLL_START_EVENT = Event(
type = EventType.POLL_START.stable, type = EventType.POLL_START.unstable,
eventId = A_FAKE_EVENT_ID, eventId = A_FAKE_EVENT_ID,
originServerTs = 1652435922563, originServerTs = 1652435922563,
senderId = A_FAKE_USER_ID, senderId = A_FAKE_USER_ID,