diff --git a/Build/MQTTnet.nuspec b/Build/MQTTnet.nuspec
index 58927293..c5a85b97 100644
--- a/Build/MQTTnet.nuspec
+++ b/Build/MQTTnet.nuspec
@@ -23,6 +23,7 @@
* [MQTTnet.Server] Added interceptor for unsubscriptions.
* [MQTTnet.AspNetCore] improved compatibility with AspNetCore 3.1
* [Client] Support WithConnectionUri to configure client (thanks to @PMExtra).
+* [Server] Removed exceptions when user properties are set with MQTT protocol version 3.1
Copyright Christian Kratky 2016-2020
MQTT Message Queue Telemetry Transport MQTTClient MQTTServer Server MQTTBroker Broker NETStandard IoT InternetOfThings Messaging Hardware Arduino Sensor Actuator M2M ESP Smart Home Cities Automation Xamarin
diff --git a/Source/MQTTnet/Formatter/V3/MqttV310DataConverter.cs b/Source/MQTTnet/Formatter/V3/MqttV310DataConverter.cs
index 48d42cd0..4bf49444 100644
--- a/Source/MQTTnet/Formatter/V3/MqttV310DataConverter.cs
+++ b/Source/MQTTnet/Formatter/V3/MqttV310DataConverter.cs
@@ -20,11 +20,6 @@ namespace MQTTnet.Formatter.V3
{
if (applicationMessage == null) throw new ArgumentNullException(nameof(applicationMessage));
- if (applicationMessage.UserProperties?.Any() == true)
- {
- throw new MqttProtocolViolationException("User properties are not supported in MQTT version 3.");
- }
-
return new MqttPublishPacket
{
Topic = applicationMessage.Topic,
@@ -171,11 +166,6 @@ namespace MQTTnet.Formatter.V3
{
if (options == null) throw new ArgumentNullException(nameof(options));
- if (options.UserProperties?.Any() == true)
- {
- throw new MqttProtocolViolationException("User properties are not supported in MQTT version 3.");
- }
-
var subscribePacket = new MqttSubscribePacket();
subscribePacket.TopicFilters.AddRange(options.TopicFilters);
@@ -186,11 +176,6 @@ namespace MQTTnet.Formatter.V3
{
if (options == null) throw new ArgumentNullException(nameof(options));
- if (options.UserProperties?.Any() == true)
- {
- throw new MqttProtocolViolationException("User properties are not supported in MQTT version 3.");
- }
-
var unsubscribePacket = new MqttUnsubscribePacket();
unsubscribePacket.TopicFilters.AddRange(options.TopicFilters);