Skip to content

Commit

Permalink
[web] Flip the switch to strip member permissions from web
Browse files Browse the repository at this point in the history
Summary: This diff increments Redux version and changes web codeVersion check for keyserver hasMinCodeVersion check to NEXT_CODE_VERSION.

Test Plan:
Will go through Test Plan a couple times in my environment.

1. Patch in this diff
2. Rebase and "stop on" (edit) "DUMMY` commit
3. Run `yarn dev` everywhere and observe the `ThreadInfo`s via Redux DevTools. Observe that there are member permissions for thin threads.
4. `git rebase --continue`
5. Observe the logs in browser dev tools and confirm that migration ran successfully
6. Observe that thin threads no longer have member permissions via Redux DevTools.

---

Before (thin, with member permissions):
{F2926333}

Before (thick, with member permissions):
{F2926335}

---

After (thin, WITHOUT member permissions):
{F2926336}

After (thick, still WITH member permissions):
{F2926371}

Reviewers: ashoat

Reviewed By: ashoat

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D13561
  • Loading branch information
atulsmadhugiri committed Oct 8, 2024
1 parent 1aad44e commit 8247096
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions keyserver/src/fetchers/thread-fetchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
getCommunity,
} from 'lib/shared/thread-utils.js';
import {
FUTURE_CODE_VERSION,
hasMinCodeVersion,
NEXT_CODE_VERSION,
} from 'lib/shared/version-utils.js';
import type { AvatarDBContent, ClientAvatar } from 'lib/types/avatar-types.js';
import type { RawMessageInfo, MessageInfo } from 'lib/types/message-types.js';
Expand Down Expand Up @@ -310,7 +310,7 @@ function rawThreadInfosFromServerThreadInfos(
);
const stripMemberPermissions = hasMinCodeVersion(viewer.platformDetails, {
native: 379,
web: FUTURE_CODE_VERSION,
web: NEXT_CODE_VERSION,
});

const threadInfos: {
Expand Down
2 changes: 1 addition & 1 deletion native/redux/persist.js
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,7 @@ const persistConfig = {
storage: AsyncStorage,
blacklist: persistBlacklist,
debug: __DEV__,
version: 83,
version: 84,
transforms: [
messageStoreMessagesBlocklistTransform,
reportStoreTransform,
Expand Down
2 changes: 1 addition & 1 deletion web/redux/persist-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
const rootKey = 'root';
const rootKeyPrefix = 'persist:';
const completeRootKey = `${rootKeyPrefix}${rootKey}`;
const storeVersion = 83;
const storeVersion = 84;

export { rootKey, rootKeyPrefix, completeRootKey, storeVersion };

0 comments on commit 8247096

Please sign in to comment.