}
/**
- * @param string $network network
- * @param string $profile optional, default empty
+ * @param string $network network of the contact
+ * @param string $profile optional, default empty
+ * @param string $protocol (Optional) Protocol that is used for the transmission
* @return string
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
- public static function networkToName($network, $profile = "")
+ public static function networkToName($network, $profile = '', $protocol = '')
{
$nets = [
Protocol::DFRN => L10n::t('DFRN'),
}
}
+ if (!empty($protocol) && ($protocol != $network)) {
+ $networkname = L10n::t('%s (via %s)', $networkname, self::networkToName($protocol));
+ }
+
return $networkname;
}