kurt.napolitano.nice | 2022-05-23 17:37:15 UTC | #1
The topic subscription for user routing status updates does not successfully get removed from the type map.
If you subscribe to for example v2.users.{some-guid}.routingStatus, when you add the subscription on line 118
https://github.com/MyPureCloud/platform-client-sdk-dotnet/blob/master/build/src/PureCloudPlatform.Client.V2/Extensions/Notifications/NotificationHandler.cs#L118
The string key that goes into the type map adds a .ToLowerInvariant() call to the topic name, resulting in routingstatus instead of routingStatus.
This is fine until you go to remove the subscription later. If you try to remove the subscription using the string you subscribed to, it will silently fail on line 152
https://github.com/MyPureCloud/platform-client-sdk-dotnet/blob/master/build/src/PureCloudPlatform.Client.V2/Extensions/Notifications/NotificationHandler.cs#L152
Because the key stored in the private type map is (unbeknown to the user) all lower case, even though the API only accepts routingStatus with a capital S as the topic string.
kurt.napolitano.nice | 2022-05-23 17:45:48 UTC | #2
Changing line 152
https://github.com/MyPureCloud/platform-client-sdk-dotnet/blob/master/build/src/PureCloudPlatform.Client.V2/Extensions/Notifications/NotificationHandler.cs#L152
to be _typeMap.Remove(topic.ToLowerInvariant()); worked for me.
anon11147534 | 2022-05-25 13:08:32 UTC | #3
Hi,
This appears to be related to a recent switch in our code generator tooling. I'll have a release of this ready for the next release of the SDK.
kurt.napolitano.nice | 2022-05-25 13:11:46 UTC | #4
Confirmed, release 145.0.1 contains this fix.
Thanks so much!
system | 2022-06-25 13:12:24 UTC | #5
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 14847