Implemented hide AKA, Minor Node::class changes, other fixes
This commit is contained in:
@@ -181,10 +181,24 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
// @todo We need to evaluate what the remote presents
|
||||
$compat_codes = $this->originate ? ['ZMO','ARC','XMA'] : ['ZMO'];
|
||||
|
||||
// Only show our AKAs relevant to the site we are ccmmunicating with
|
||||
if ($this->setup->optionGet(Setup::O_HIDEAKA)) {
|
||||
$addresses = collect();
|
||||
|
||||
foreach ($this->node->aka_remote as $ao)
|
||||
$addresses = $addresses->merge($this->setup->system->match($ao->zone));
|
||||
|
||||
Log::debug(sprintf('%s: - Presenting limited AKAs [%s]',__METHOD__,$addresses->pluck('ftn')->join(',')));
|
||||
|
||||
} else {
|
||||
$addresses = $this->setup->system->addresses;
|
||||
|
||||
Log::debug(sprintf('%s: - Presenting ALL our AKAs [%s]',__METHOD__,$addresses->pluck('ftn')->join(',')));
|
||||
}
|
||||
|
||||
// Site address, password and compatibility
|
||||
// @todo Only show the AKAs that is relevant to the node we are connecting to
|
||||
$makedata .= sprintf('{EMSI}{%s}{%s}{%s}{%s}',
|
||||
$this->setup->system->addresses->pluck('ftn')->join(' '),
|
||||
$addresses->pluck('ftn')->join(' '),
|
||||
$this->node->password == '-' ? '' : $this->node->password,
|
||||
join(',',$link_codes),
|
||||
join(',',$compat_codes),
|
||||
@@ -1169,7 +1183,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
// See if there is anything to add to the outbound
|
||||
// Add our mail to the queue if we have authenticated
|
||||
if ($this->node->aka_authed)
|
||||
foreach ($this->node->aka_remote as $ao) {
|
||||
foreach ($this->node->aka_remote_authed as $ao) {
|
||||
$this->send->mail($ao);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user