Hi,
I’ve noticed an issue when publishing (pushing) messages to a specific set of devices. If an empty list of deviceID’s is targeted then the message is actually published to all devices, instead of none. There’s no problem as long as one value is specified. This value doesn’t have to be associated with a device, it just has to be passed.
DeliveryOptions deliveryOptions = new DeliveryOptions();
deliveryOptions.setPushPolicy( PushPolicyEnum.ONLY );
List<String> deviceIDs= getRecipientDeviceIDs(
p_conversation,
p_sender
);
//deliveryOptions.setPushSinglecast( deviceIDs );
/*
for( String deviceID : deviceIDs )
{
deliveryOptions.addPushSinglecast( deviceID );
}
*/
deliveryOptions.addPushSinglecast( "somerandomgarbagedeviceidthatisntreal" );
return deliveryOptions;
Is this expected behaviour or is it a bug with this type of message publishing? As you can see from the commented out code I’ve tried a few variations on inputting deviceIDs. I could simply not ‘publish’ the message by detecting zero deviceIDs, so maybe I’m being pedantic. Just thought i’d flag it anway though in case it has any other knock-on affects within your system.
Cheers,
Grant.