mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-16 10:37:26 -05:00
Prefer talkgroup ID over radio ID for Calls (#1227)
This commit is contained in:
@@ -447,28 +447,20 @@ public class BroadcastifyCallBroadcaster extends AbstractAudioBroadcaster<Broadc
|
|||||||
*/
|
*/
|
||||||
private static String getTo(AudioRecording audioRecording)
|
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
|
if(identifier instanceof PatchGroupIdentifier patchGroupIdentifier)
|
||||||
for(Identifier identifier: toIdentifiers)
|
|
||||||
{
|
{
|
||||||
if(identifier instanceof PatchGroupIdentifier patchGroupIdentifier)
|
return format(patchGroupIdentifier);
|
||||||
{
|
|
||||||
return format(patchGroupIdentifier);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else if(identifier instanceof TalkgroupIdentifier talkgroupIdentifier)
|
||||||
for(Identifier identifier: toIdentifiers)
|
|
||||||
{
|
{
|
||||||
if(identifier instanceof TalkgroupIdentifier talkgroupIdentifier)
|
return String.valueOf(RadioReferenceDecoder.convertToRadioReferenceTalkgroup(talkgroupIdentifier.getValue(),
|
||||||
{
|
talkgroupIdentifier.getProtocol()));
|
||||||
return String.valueOf(RadioReferenceDecoder.convertToRadioReferenceTalkgroup(talkgroupIdentifier.getValue(),
|
}
|
||||||
talkgroupIdentifier.getProtocol()));
|
else if(identifier instanceof RadioIdentifier radioIdentifier)
|
||||||
}
|
{
|
||||||
else if(identifier instanceof RadioIdentifier radioIdentifier)
|
return radioIdentifier.getValue().toString();
|
||||||
{
|
|
||||||
return radioIdentifier.getValue().toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return "0";
|
return "0";
|
||||||
|
|||||||
Reference in New Issue
Block a user