This looks really hacky, but we probably don't have a clear way of doing this.
- Feed Queries
- All Stories
- Search
- Feed Search
- Transactions
- Transaction Logs
Mar 8 2024
Mar 7 2024
Mar 6 2024
This migration wasn't already applied, right?
Do we have a task for the migration?
In D11209#324884, @atul wrote:In D11209#324215, @tomek wrote:However, if there is no specialRole field encountered, we will assume we're dealing with a Server/"legacy" type and fallback to sketchy string search.
What is the scenario when this can happen?
There are three places where threadHasAdminRole is encountered:
- lib/shared/thread-utils: getAvailableThreadMemberActions()
- lib/selectors/thread-selectors: baseOtherUsersButNoOtherAdmins()
- keyserver/src/updaters/thread-updaters: leaveThread()
getAvailableThreadMemberActions is used in
- native/chat/settings/thread-settings-member.react.js
- web/modals/threads/members/member.react.js
Which are all expected to have the specialRole field in RoleInfos.
baseOtherUsersButNoOtherAdmins is a Redux selector that is only used on the client, where again we expect the specialRole field in RoleInfos.
leaveThread() is part of thread-updaters on the keyserver and calls threadHasAdminRole with LegacyRawThreadInfo | RawThreadInfo returned from rawThreadInfosFromServerThreadInfos. This is the scenario where we need to handle RoleInfos without the specialRole field patched in.
Mar 5 2024
Mar 4 2024
Just to make sure: sessionRecoveryInProgress isn't persisted, right?
I think that the practice of keeping commented-out types has a big advantage of reducing confusion when searching for older revisions while it doesn't have significant disadvantages.
However, if there is no specialRole field encountered, we will assume we're dealing with a Server/"legacy" type and fallback to sketchy string search.
What is the scenario when this can happen?
We should reintroduce the util (probably as a simple function) if we would need to decide if we can edit / delete a role in some other places.
I don't understand the reason behind this diff and the task from the summary doesn't have any description. Why can't we simply check RoleInfo and its specialRole field?
Mar 1 2024
Feb 29 2024
Fix typo
Fix prop name
Use thread type const.
Update entries test by adding explicit calendar query from the past - the test failed as expected. Updated the dates in entries, which fixed the tests.
Feb 27 2024
In D11166#323019, @atul wrote:Mostly looks good, but do we need to handle clearing the data on log out/delete account/etc?