mirror of
https://github.com/friendica/friendica
synced 2025-04-30 09:44:22 +02:00
Allow longer avatar URLs / the system outbox is now handled
This commit is contained in:
parent
33102a76da
commit
0a4f0d616a
3 changed files with 6 additions and 6 deletions
|
@ -385,18 +385,18 @@ class APContact
|
|||
}
|
||||
|
||||
// When the photo is too large, try to shorten it by removing parts
|
||||
if (strlen($apcontact['photo'] ?? '') > 255) {
|
||||
if (strlen($apcontact['photo'] ?? '') > 383) {
|
||||
$parts = parse_url($apcontact['photo']);
|
||||
unset($parts['fragment']);
|
||||
$apcontact['photo'] = (string)Uri::fromParts((array)$parts);
|
||||
|
||||
if (strlen($apcontact['photo']) > 255) {
|
||||
if (strlen($apcontact['photo']) > 383) {
|
||||
unset($parts['query']);
|
||||
$apcontact['photo'] = (string)Uri::fromParts((array)$parts);
|
||||
}
|
||||
|
||||
if (strlen($apcontact['photo']) > 255) {
|
||||
$apcontact['photo'] = substr($apcontact['photo'], 0, 255);
|
||||
if (strlen($apcontact['photo']) > 383) {
|
||||
$apcontact['photo'] = substr($apcontact['photo'], 0, 383);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue