Prefer talkgroup ID over radio ID for Calls (#1227)

This commit is contained in:
Doug Hoffman
2022-05-07 06:51:27 -04:00
committed by GitHub
parent 3c58e98788
commit f4ab46b79d

View File

@@ -447,20 +447,13 @@ public class BroadcastifyCallBroadcaster extends AbstractAudioBroadcaster<Broadc
*/
private static String getTo(AudioRecording audioRecording)
{
List<Identifier> toIdentifiers = audioRecording.getIdentifierCollection().getIdentifiers(Role.TO);
Identifier identifier = audioRecording.getIdentifierCollection().getToIdentifier();
//Format a patch group first, if there are multiples
for(Identifier identifier: toIdentifiers)
{
if(identifier instanceof PatchGroupIdentifier patchGroupIdentifier)
{
return format(patchGroupIdentifier);
}
}
for(Identifier identifier: toIdentifiers)
{
if(identifier instanceof TalkgroupIdentifier talkgroupIdentifier)
else if(identifier instanceof TalkgroupIdentifier talkgroupIdentifier)
{
return String.valueOf(RadioReferenceDecoder.convertToRadioReferenceTalkgroup(talkgroupIdentifier.getValue(),
talkgroupIdentifier.getProtocol()));
@@ -469,7 +462,6 @@ public class BroadcastifyCallBroadcaster extends AbstractAudioBroadcaster<Broadc
{
return radioIdentifier.getValue().toString();
}
}
return "0";
}