@@ -251,20 +251,14 @@ class InteractionModelCommands
251
251
252
252
chip::app::CommandPathParams commandPath = { endpointId, clusterId, commandId,
253
253
(chip::app::CommandPathFlags::kEndpointIdValid ) };
254
- std::unique_ptr<chip::app::CommandSender> commandSender;
255
- if (device->GetSecureSession ().Value ()->AllowsLargePayload ())
256
- {
257
- commandSender = std::make_unique<chip::app::CommandSender>(mCallback , device->GetExchangeManager (),
258
- mTimedInteractionTimeoutMs .HasValue (),
259
- mSuppressResponse .ValueOr (false ),
260
- /* allowLargePayload = */ true );
261
- }
262
- else
263
- {
264
- commandSender = std::make_unique<chip::app::CommandSender>(mCallback , device->GetExchangeManager (),
265
- mTimedInteractionTimeoutMs .HasValue (),
266
- mSuppressResponse .ValueOr (false ));
267
- }
254
+ std::unique_ptr<chip::app::CommandSender> commandSender =
255
+ std::make_unique<chip::app::CommandSender>(
256
+ mCallback ,
257
+ device->GetExchangeManager (),
258
+ mTimedInteractionTimeoutMs .HasValue (),
259
+ mSuppressResponse .ValueOr (false ),
260
+ device->GetSecureSession ().Value ()->AllowsLargePayload ());
261
+
268
262
VerifyOrReturnError (commandSender != nullptr , CHIP_ERROR_NO_MEMORY);
269
263
270
264
chip::app::CommandSender::AddRequestDataParameters addRequestDataParams (mTimedInteractionTimeoutMs );
0 commit comments