How to use the @wireapp/protocol-messaging.Asset.NotUploaded function in @wireapp/protocol-messaging

To help you get started, we’ve selected a few @wireapp/protocol-messaging examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wireapp / wire-webapp / test / unit_tests / cryptography / CryptographyMapperSpec.js View on Github external
it('resolves with a mapped cancelled upload asset message', () => {
      const asset = new Asset({notUploaded: Asset.NotUploaded.CANCELLED});

      const generic_message = new GenericMessage({
        [GENERIC_MESSAGE_TYPE.ASSET]: asset,
        messageId: createRandomUuid(),
      });

      return mapper.mapGenericMessage(generic_message, event).then(event_json => {
        expect(isObject(event_json)).toBeTruthy();
        expect(event_json.type).toBe(ClientEvent.CONVERSATION.ASSET_ADD);
        expect(event_json.conversation).toBe(event.conversation);
        expect(event_json.from).toBe(event.from);
        expect(event_json.time).toBe(event.time);
        expect(event_json.id).toBe(generic_message.messageId);
        expect(event_json.data.reason).toBe(Asset.NotUploaded.CANCELLED);
      });
    });
github wireapp / wire-webapp / test / unit_tests / cryptography / CryptographyMapperSpec.js View on Github external
return mapper.mapGenericMessage(generic_message, event).then(event_json => {
        expect(isObject(event_json)).toBeTruthy();
        expect(event_json.type).toBe(ClientEvent.CONVERSATION.ASSET_ADD);
        expect(event_json.conversation).toBe(event.conversation);
        expect(event_json.from).toBe(event.from);
        expect(event_json.time).toBe(event.time);
        expect(event_json.id).toBe(generic_message.messageId);
        expect(event_json.data.reason).toBe(Asset.NotUploaded.CANCELLED);
      });
    });