I'm trying to use PubNub to read messages published in a specific channel. Publishing is working correctly.
On my Angular 10 Frontend I'm trying the following:
this.pubnubService.subscribe({ channels: ['channel1'], triggerEvents: true });
this.pubnubService.getMessage(this.currentlySubscribedPubNubChannels, message => {
console.log(message);
});
However, no message is received when publishing (via my API or the Debug console on pubnub.com).
On the other side, if I specify a listener, I can receive messages on ALL channels (which is not what I want to achieve):
this.pubnubService.addListener({
message: (message) => {
console.log(message);
}
});
Can anybody tell me why the general listener is working but listening on a particular channel is not?
Any help is appreciated, thanks, Pascal