diff --git a/package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap b/package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap index c1bac1bb85..d32eade312 100644 --- a/package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +++ b/package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap @@ -58,6 +58,7 @@ exports[`Thread should match thread snapshot 1`] = ` ], "html": "
regular
", "id": "38ef6f7c-3090-5759-a37f-ab0053aadb96", + "message_text_updated_at": "2020-05-05T14:50:00.000Z", "parent_id": "b4612a73-fa2b-5787-bf71-1adc8f291a04", "pinned_at": null, "readBy": false, @@ -86,6 +87,7 @@ exports[`Thread should match thread snapshot 1`] = ` ], "html": "regular
", "id": "516efa25-5d29-5c9a-ad2d-4cc183e785bd", + "message_text_updated_at": "2020-05-05T14:50:00.000Z", "parent_id": "b4612a73-fa2b-5787-bf71-1adc8f291a04", "pinned_at": null, "readBy": false, @@ -114,6 +116,7 @@ exports[`Thread should match thread snapshot 1`] = ` ], "html": "regular
", "id": "82a83b16-b611-527c-b3ac-765ef6220490", + "message_text_updated_at": "2020-05-05T14:50:00.000Z", "parent_id": "b4612a73-fa2b-5787-bf71-1adc8f291a04", "pinned_at": null, "readBy": false, @@ -490,6 +493,40 @@ exports[`Thread should match thread snapshot 1`] = ` > 2:50 PM +regular
', id: uuidv4(), + message_text_updated_at: timestamp, text: uuidv4(), type: 'regular', updated_at: timestamp.toString(), @@ -24,6 +25,7 @@ export const generateStaticMessage = (seed, options, date) => generateMessage({ created_at: date || '2020-04-27T13:39:49.331742Z', id: uuidv5(seed, StreamReactNativeNamespace), + message_text_updated_at: date || '2020-04-27T13:39:49.331742Z', text: seed, updated_at: date || '2020-04-27T13:39:49.331742Z', ...options, diff --git a/package/src/store/QuickSqliteClient.ts b/package/src/store/QuickSqliteClient.ts index 440c96d647..7cfc8e708b 100644 --- a/package/src/store/QuickSqliteClient.ts +++ b/package/src/store/QuickSqliteClient.ts @@ -30,7 +30,7 @@ import type { PreparedQueries, Table } from './types'; * */ export class QuickSqliteClient { - static dbVersion = 4; + static dbVersion = 5; static dbName = DB_NAME; static dbLocation = DB_LOCATION; diff --git a/package/src/store/mappers/mapMessageToStorable.ts b/package/src/store/mappers/mapMessageToStorable.ts index b38edf0b97..9e267115fe 100644 --- a/package/src/store/mappers/mapMessageToStorable.ts +++ b/package/src/store/mappers/mapMessageToStorable.ts @@ -15,6 +15,7 @@ export const mapMessageToStorable = ( id, // eslint-disable-next-line @typescript-eslint/no-unused-vars latest_reactions, + message_text_updated_at, // eslint-disable-next-line @typescript-eslint/no-unused-vars own_reactions, reaction_groups, @@ -32,6 +33,7 @@ export const mapMessageToStorable = ( deletedAt: mapDateTimeToStorable(deleted_at), extraData: JSON.stringify(extraData), id, + messageTextUpdatedAt: mapDateTimeToStorable(message_text_updated_at), reactionGroups: JSON.stringify(reaction_groups), text, type, diff --git a/package/src/store/mappers/mapStorableToMessage.ts b/package/src/store/mappers/mapStorableToMessage.ts index a051cab001..2d58ad1f4d 100644 --- a/package/src/store/mappers/mapStorableToMessage.ts +++ b/package/src/store/mappers/mapStorableToMessage.ts @@ -19,7 +19,16 @@ export const mapStorableToMessage = < messageRow: TableRowJoinedUser<'messages'>; reactionRows: TableRowJoinedUser<'reactions'>[]; }): MessageResponse