Azure / azure-notificationhubs-dotnet

.NET SDK for Azure Notification Hubs
MIT License
70 stars 119 forks source link

PartialUpdateOperation Replace not working for multiple tags #193

Open eqcb opened 3 years ago

eqcb commented 3 years ago

When patching an device installation on a Azure Notification Hub, if I pass more than one tag (comma separated) to the values parameter of the PartialUpdateOperation object for a Replace operation, it's accepted by the back-end but those tags wont ever work when you try to target devices using Tag Expressions.

new PartialUpdateOperation() { Operation = UpdateOperationType.Replace, Path = "/tags", "tag1,tag2,tag3"}

It only works when a single tag is present in the values parameter. For my application I have the requirement of couple or more tags per device. So right now I need to call PatchInstallationAsync with a Remove operation and then multiple times with Add operations for each tag.

If I use VS Server Explorer window to diagnose the Hub it shows all tags there, just like if they were added one by one but does not work. image

For eg., only one device receives the notification for RECEIVER tag(when I patch all tags together).

Is this as intended or the Replace operation should be working for multiple tags?