Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(async () => {
const login = {
clientType: ClientType.TEMPORARY,
email: process.env.WIRE_EMAIL,
password: process.env.WIRE_PASSWORD,
};
const backend = process.env.WIRE_BACKEND === 'staging' ? APIClient.BACKEND.STAGING : APIClient.BACKEND.PRODUCTION;
const engine = new MemoryEngine();
await engine.init('receiver');
const apiClient = new APIClient({store: engine, urls: backend});
const account = new Account(apiClient);
const handleIncomingMessage = async messageData => {
const CONFIRM_TYPES = [
PayloadBundleType.ASSET,
PayloadBundleType.ASSET_IMAGE,
PayloadBundleType.LOCATION,
PayloadBundleType.PING,
PayloadBundleType.TEXT,
];
const {content, conversation: conversationId, from, id: messageId, messageTimer = 0, type} = messageData;
const additionalContent = [];