Skip to content

Bug: postal.when callback never gets called when incoming messages do not have a data property #10

@estaylorco

Description

@estaylorco

Hello,

I've just discovered that publishing messages to a when array of channelDefs will fail to cause the when callback to be called if the messages do not have a data property. I'm having to do this:

postal.publish({ channel: 'c', topic: 't', data: {} });  // <- empty data property

I'm not suggesting that the data property's value must be an empty plain object, only that it must be present. If I remove the data property, the when callback never gets called.

I don't think this is appropriate. It's not always the case that the message payloads are of interest. Meaningfulness might actually simply be that all of the messages were published and received [within the timeout interval], without regard for the payloads.

Please advise.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions