Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marcinwasowicz/dc64fde8c1ab67aeeabdcfce8008565d to your computer and use it in GitHub Desktop.
Save marcinwasowicz/dc64fde8c1ab67aeeabdcfce8008565d to your computer and use it in GitHub Desktop.
+import { messageTypes } from 'lib/types/message-types-enum.js';
import { filesystemMediaCache } from '../media/media-cache.js';
-import { commCoreModule } from '../native-modules.js';
+import { commCoreModule, commValidationModule } from '../native-modules.js';
import { setStoreLoadedActionType } from '../redux/action-types.js';
import { useSelector } from '../redux/redux-utils.js';
import { StaffContext } from '../staff/staff-context.js';
@@ -100,6 +100,12 @@ function SQLiteDataHandler(): React.Node {
const handleSensitiveData = React.useCallback(async () => {
try {
+ await commValidationModule.validateMessageTypes(
+ Object.entries(messageTypes).map(([messageTypeKey]) => ({
+ messageTypeKey,
+ messageType: messageTypes[messageTypeKey],
+ })),
+ );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment