element-portable/src
Andy Balaam 8b7f49e74e
Rewrite doesRoomOrThreadHaveUnreadMessages to use the receipt rewrite from js-sdk (#11903)
* Rewrite doesRoomOrThreadHaveUnreadMessages to use the receipt rewrite from js-sdk

* Remove unit tests that rely on receipt timestamps

Previously, if we found a receipt for an unknown event, we would use the
receipt timestamp and declare all events before that time to be read.
Now, we ignore such "dangling" receipts until we find the event they
refer to.

This new behaviour is more correct, but does lead to more messages being
considered unread.

This commit deletes tests that checked for the old behaviour.

* Check for a missing thread in determineUnreadState

* Fix incorrect way to find room timeline

* More realistic test setup to support new receipt code

* Update snapshot to expect a room to be unread when there are no receipts

* Formatting fixes

* Update snapshot to show menu and notif button

* Disable some flaky tests

* Disable some flaky tests

* Fix test to make a threaded receipt for an event that is actually in the thread

---------

Co-authored-by: Florian Duros <florianduros@element.io>
Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
2023-11-29 13:36:52 +00:00
..
@types Update custom translations to support nested fields in structured JSON (#11685) 2023-10-02 10:44:25 +00:00
accessibility Migrate more strings to translation keys (#11613) 2023-09-19 17:16:38 +01:00
actions Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
async-components/views/dialogs Consolidate 4s passphrase input fields and use stable IDs (#11743) 2023-10-13 10:39:55 +00:00
audio Revert back to worklet-loader compatible syntax 2023-11-18 21:36:11 +01:00
autocomplete Migrate more strings to translation keys (#11672) 2023-09-27 17:15:22 +01:00
components Fix: Space scope header overflow (#11933) 2023-11-29 08:25:34 +00:00
contexts Allow adding extra icons to the room header (#11799) 2023-11-01 12:03:10 +00:00
customisations Migrate more strings to translation keys (#11669) 2023-09-26 13:04:17 +01:00
dispatcher Right panel: view third party invite info without clearing history (#11934) 2023-11-27 22:30:57 +00:00
editor Deserialise spoilers back into slash command form (#11805) 2023-10-26 13:35:02 +00:00
effects Migrate more strings to translation keys (#11579) 2023-09-08 09:58:31 +01:00
emojipicker Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
events Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
hooks Avoid rendering app download buttons if disabled in config (#11741) 2023-10-13 09:43:39 +00:00
i18n/strings [create-pull-request] automated change (#11974) 2023-11-29 11:18:34 +00:00
indexing Reduce amount of log spam (#11898) 2023-11-20 12:24:13 +00:00
integrations Remove dead & duplicated code (#11405) 2023-08-15 08:43:15 +00:00
mjolnir Migrate more strings to translation keys (#11613) 2023-09-19 17:16:38 +01:00
models Fix misunderstanding of functional members (#11918) 2023-11-22 12:08:16 +00:00
modules Knock on a ask-to-join room if a module wants to join the room when navigating to a room (#11787) 2023-10-27 12:51:39 +00:00
notifications Fix: sync intentional mentions push rules with legacy rules (#11667) 2023-09-27 00:03:38 +00:00
performance Conform more of the code base to strict null checking (#10147) 2023-02-13 17:01:43 +00:00
rageshake Element-R: Include crypto info in rageshake (#11797) 2023-10-26 08:20:36 +00:00
resizer Enable strictFunctionTypes (#11201) 2023-07-07 13:37:26 +01:00
settings Default bundled emoji font to on (#11935) 2023-11-27 09:59:09 +00:00
slash-commands Migrate more strings to translation keys (#11665) 2023-09-25 18:12:41 +01:00
stores Right panel: view third party invite info without clearing history (#11934) 2023-11-27 22:30:57 +00:00
toasts Add ringing for matrixRTC (#11870) 2023-11-21 17:12:08 +00:00
usercontent Apply prettier formatting 2022-12-12 12:24:14 +01:00
utils Fix misunderstanding of functional members (#11918) 2023-11-22 12:08:16 +00:00
voice-broadcast Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
widgets Use new matrixRTC calling (#11792) 2023-10-30 15:14:27 +00:00
workers Appease the linter 2023-11-18 21:37:49 +01:00
AddThreepid.ts Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
AsyncWrapper.tsx Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
Avatar.ts Fixes read receipt avatar offset (#11483) 2023-08-30 11:47:35 +00:00
BasePlatform.ts Update base64 import (#11784) 2023-10-20 18:19:09 +01:00
BlurhashEncoder.ts Fix paths and extensions 2023-11-13 20:10:55 +01:00
boundThreepids.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
call-types.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
ContentMessages.ts Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
createRoom.ts Always allow call.member events on new rooms (#11948) 2023-11-28 12:13:31 +00:00
DateUtils.ts Port more strings to translation keys (#11474) 2023-08-31 07:35:34 +00:00
DecryptionFailureTracker.ts Switch to importing models/event from main js-sdk export (#11363) 2023-08-07 08:24:58 +00:00
DeviceListener.ts DeviceListener: Remove usage of deprecated keybackup API (#11614) 2023-09-20 11:34:18 +00:00
Editing.ts Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
email.ts Factor out basic email check (#10244) 2023-02-28 10:39:35 +01:00
HtmlUtils.tsx Consume @matrix-org/emojibase-bindings (#11433) 2023-08-21 20:06:40 +01:00
IConfigOptions.ts Show all labs flags if developerMode enabled (#11746) 2023-10-13 13:24:00 +00:00
identifiers.ts
IdentityAuthClient.tsx Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
ImageUtils.ts Conform more of the codebase to strictNullChecks (#10573) 2023-04-13 08:52:57 +01:00
index.ts Step 6: Refactor event rendering to stop using getComponent 2022-03-28 14:02:31 -06:00
KeyBindingsDefaults.ts Apply strictNullChecks around the codebase (#10302 2023-03-07 13:19:18 +00:00
KeyBindingsManager.ts Conform more code to strictNullChecks (#10374) 2023-03-16 11:07:29 +00:00
Keyboard.ts Comply with noImplicitAny (#9940) 2023-02-13 11:39:16 +00:00
languageHandler.tsx Update custom translations to support nested fields in structured JSON (#11685) 2023-10-02 10:44:25 +00:00
LegacyCallHandler.tsx Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
Lifecycle.ts Keep device language when it has been previosuly set, after a successful delegated authentication flow that clears localStorage (#11902) 2023-11-24 15:51:28 +00:00
linkify-matrix.ts Fix clicking MXID in timeline going to matrix.to (#11263) 2023-07-14 10:55:55 +00:00
Livestream.ts Pass around MatrixClients instead of using MatrixClientPeg (#10984) 2023-06-01 14:43:24 +01:00
Login.ts OIDC: register (#11727) 2023-10-11 21:44:46 +00:00
Markdown.ts Treat lists with a single empty item as plain text, not Markdown. (#6833) 2023-08-17 16:37:19 +00:00
MatrixClientPeg.ts Reduce amount of log spam (#11898) 2023-11-20 12:24:13 +00:00
MediaDeviceHandler.ts Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
Modal.tsx Switch to importing matrix-js-sdk from its main export (#11360) 2023-08-03 12:56:30 +00:00
NodeAnimator.tsx Conform more of the codebase to strict types (#11162) 2023-06-29 12:17:05 +01:00
Notifier.ts Add ringing for matrixRTC (#11870) 2023-11-21 17:12:08 +00:00
PageTypes.ts Delete the remainder of groups (#9357) 2022-10-05 17:44:46 +00:00
PasswordReset.ts Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
phonenumber.ts Get country names from the browser instead of manual i18n (#11428) 2023-08-22 16:15:16 +00:00
PlatformPeg.ts Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
PosthogAnalytics.ts Report crypto sdk in posthog (#11834) 2023-11-13 14:16:12 +00:00
PosthogTrackers.ts Lock out the first tab if Element is opened in a second tab. (#11425) 2023-08-24 08:28:43 +00:00
Presence.ts Switch to updating presence via /sync calls instead of PUT /presence (#11824) 2023-11-01 10:49:47 +00:00
Registration.tsx Migrate more strings to translation keys (#11608) 2023-09-19 07:17:31 +01:00
Resend.ts Switch to importing models/Room from main js-sdk export (#11361) 2023-08-04 07:36:16 +00:00
Roles.ts Migrate more strings to translation keys (#11498) 2023-08-31 11:22:10 +01:00
RoomAliasCache.ts Conform more of the code base to strict null checking (#10147) 2023-02-13 17:01:43 +00:00
RoomInvite.tsx Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
RoomNotifs.ts Rewrite doesRoomOrThreadHaveUnreadMessages to use the receipt rewrite from js-sdk (#11903) 2023-11-29 13:36:52 +00:00
Rooms.ts Switch to importing models/Room from main js-sdk export (#11361) 2023-08-04 07:36:16 +00:00
ScalarAuthClient.ts Switch to importing models/Room from main js-sdk export (#11361) 2023-08-04 07:36:16 +00:00
ScalarMessaging.ts Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
SdkConfig.ts Show all labs flags if developerMode enabled (#11746) 2023-10-13 13:24:00 +00:00
Searching.ts Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
SecurityManager.ts Update base64 import (#11784) 2023-10-20 18:19:09 +01:00
SendHistoryManager.ts Switch to importing models/event from main js-sdk export (#11363) 2023-08-07 08:24:58 +00:00
sendTimePerformanceMetrics.ts Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
sentry.ts Add crypto info for rust crypto in sentry (#11798) 2023-10-26 15:45:05 +00:00
shouldHideEvent.ts Switch to importing @types/{event,partials} from main js-sdk export (#11369) 2023-08-08 10:12:12 +00:00
SlashCommands.tsx Disable upgraderoom command without developer mode enabled (#11744) 2023-10-13 09:48:32 +00:00
SlidingSyncManager.ts Switch to importing @types/{event,partials} from main js-sdk export (#11369) 2023-08-08 10:12:12 +00:00
Terms.ts Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
TextForEvent.tsx Migrate more strings to translation keys (#11683) 2023-10-02 13:52:27 +01:00
theme.ts Migrate more strings to translation keys (#11613) 2023-09-19 17:16:38 +01:00
Typeguards.ts RTE plain text mentions as pills (#10852) 2023-05-16 11:54:16 +00:00
Unread.ts Rewrite doesRoomOrThreadHaveUnreadMessages to use the receipt rewrite from js-sdk (#11903) 2023-11-29 13:36:52 +00:00
UserActivity.ts Comply with noImplicitAny (#9940) 2023-02-13 11:39:16 +00:00
UserAddress.ts Remove dead code (#9035) 2022-07-11 07:52:44 +02:00
verification.ts Switch to importing models/{event-timeline{,set},user,device,event-status} from main js-sdk export (#11368) 2023-08-08 07:16:04 +00:00
Views.ts Lock out the first tab if Element is opened in a second tab. (#11425) 2023-08-24 08:28:43 +00:00
VoipUserMapper.ts Switch to importing models/Room from main js-sdk export (#11361) 2023-08-04 07:36:16 +00:00
WhoIsTyping.ts Migrate more strings to translation keys (#11530) 2023-09-05 10:44:41 +01:00
WorkerManager.ts Load web workers in a way that Webpack 5 can bundle them 2023-11-11 16:03:08 +01:00