Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change how linkedin information is stored #2200

Merged
merged 6 commits into from
Dec 25, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@
use App\Services\BaseService;
use App\Models\Account\Account;
use Illuminate\Support\Collection;
use App\Models\Contact\ContactFieldType;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\App;
use App\Models\Contact\LifeEventType;
use Illuminate\Database\QueryException;
use App\Models\Contact\LifeEventCategory;
use App\Models\Contact\ContactFieldType;

/**
* Populate the contact field types table for a given account.
Expand Down
2 changes: 1 addition & 1 deletion app/Services/VCard/ExportVCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private function exportContactFields(Contact $contact, VCard $vcard)
$vcard->add('socialProfile', $this->escape('http://t.me/'.$contactField->data), ['type' => 'telegram']);
break;
case 'LinkedIn':
$vcard->add('socialProfile', $this->escape('http://www.linkedin.com/in/' . $contact->data), ['type' => 'linkedin']);
$vcard->add('socialProfile', $this->escape('http://www.linkedin.com/in/'.$contact->data), ['type' => 'linkedin']);
break;
default:
break;
Expand Down
2 changes: 1 addition & 1 deletion app/Services/VCard/ImportVCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ private function importSocialProfile(Contact $contact, VCard $entry): void
break;
case 'linkedin':
$contactFieldTypeId = $this->getContactFieldTypeId('LinkedIn');
$data = str_replace('http://www.linkedin.com/in/', '', $this->formatValue((string)$socialProfile));
$data = str_replace('http://www.linkedin.com/in/', '', $this->formatValue((string) $socialProfile));
break;
default:
// Not supported
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

use App\Models\Account\Account;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use App\Services\Auth\Population\PopulateContactFieldTypesTable;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

use App\Models\Contact\Contact;
use App\Models\Contact\ContactFieldType;
use Illuminate\Support\Facades\Schema;
use App\Models\Contact\ContactFieldType;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

Expand All @@ -26,7 +26,7 @@ public function up()
$contact->contactFields()->create([
'account_id' => $contact->account_id,
'contact_field_type_id' => $contactFieldType->id,
'data' => $contact->linkedin_profile_url
'data' => $contact->linkedin_profile_url,
]);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
use App\Models\Account\Account;
use Illuminate\Support\Facades\DB;
use App\Exceptions\MissingParameterException;
use App\Services\Auth\Population\PopulateContactFieldTypesTable;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use App\Services\Auth\Population\PopulateContactFieldTypesTable;

class PopulateContactFieldTypesTableTest extends TestCase
{
Expand Down