Merge pull request #2081 from nextcloud/fix/twitter-uri
adapted twitter uri
This commit is contained in:
commit
9d3cc8f44b
|
@ -69,9 +69,9 @@ class TwitterProvider implements ISocialProvider {
|
|||
$profileIds = $this->getProfileIds($contact);
|
||||
$urls = [];
|
||||
foreach ($profileIds as $profileId) {
|
||||
$recipe = 'https://mobile.twitter.com/{socialId}';
|
||||
$recipe = 'https://twitter.com/{socialId}';
|
||||
$connector = str_replace("{socialId}", $profileId, $recipe);
|
||||
$connector = $this->getFromHtml($connector, '_normal');
|
||||
$connector = $this->getFromHtml($connector, 'profile_image');
|
||||
$urls[] = $connector;
|
||||
}
|
||||
return $urls;
|
||||
|
|
|
@ -100,16 +100,16 @@ class TwitterProviderTest extends TestCase {
|
|||
]
|
||||
];
|
||||
$contactWithSocialUrls = [
|
||||
"https://mobile.twitter.com/username1",
|
||||
"https://mobile.twitter.com/username2",
|
||||
"https://twitter.com/username1",
|
||||
"https://twitter.com/username2",
|
||||
];
|
||||
$contactWithSocialHtml = [
|
||||
'<html><img src="username1_normal.jpg" /></html>',
|
||||
'<html><img src="username2_normal.jpg" /></html>',
|
||||
'<html><img src="./profile_images/username1_normal.jpg" /></html>',
|
||||
'<html><img src="./profile_images/username2_normal.jpg" /></html>',
|
||||
];
|
||||
$contactWithSocialImgs = [
|
||||
"username1_400x400.jpg",
|
||||
"username2_400x400.jpg"
|
||||
"./profile_images/username1_400x400.jpg",
|
||||
"./profile_images/username2_400x400.jpg"
|
||||
];
|
||||
|
||||
$contactWithoutSocial = [
|
||||
|
|
Loading…
Reference in New Issue