Skip to content

Commit b1ae27d

Browse files
authored
add channelaffinity to callrecording sync method (#36193)
1 parent c59b2af commit b1ae27d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

sdk/communication/Azure.Communication.CallAutomation/src/CallRecording.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,19 @@ public virtual Response<RecordingStateResult> Start(StartRecordingOptions option
7272
}
7373
}
7474

75+
if (options.ChannelAffinity != null && options.ChannelAffinity.Any())
76+
{
77+
foreach (var c in options.ChannelAffinity)
78+
{
79+
ChannelAffinityInternal newChannelAffinity = new ChannelAffinityInternal(CommunicationIdentifierSerializer.Serialize(c.Participant));
80+
if (c.Channel != null)
81+
{
82+
newChannelAffinity.Channel = c.Channel;
83+
}
84+
request.ChannelAffinity.Add(newChannelAffinity);
85+
}
86+
}
87+
7588
if (options.ExternalStorage is not null)
7689
{
7790
request.ExternalStorage = TranslateExternalStorageToInternal(options.ExternalStorage);

0 commit comments

Comments
 (0)