mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 10:08:05 +00:00
Fix FLEXIAPI-140 Select the display_name attribute from the database to inject...
This commit is contained in:
parent
248fce60fe
commit
07f8a6e7dd
4 changed files with 7 additions and 5 deletions
|
|
@ -473,8 +473,8 @@ IMPP:sip:' . $this->getIdentifierAttribute();
|
|||
|
||||
$vcard .= '
|
||||
FN:';
|
||||
$vcard .= !empty($this->attributes['display_name'])
|
||||
? $this->attributes['display_name']
|
||||
$vcard .= !empty($this->display_name)
|
||||
? $this->display_name
|
||||
: $this->getIdentifierAttribute();
|
||||
|
||||
if ($this->dtmf_protocol) {
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ function captchaConfigured(): bool
|
|||
|
||||
function resolveUserContacts(Request $request)
|
||||
{
|
||||
$selected = ['id', 'username', 'domain', 'activated', 'dtmf_protocol'];
|
||||
$selected = ['id', 'username', 'domain', 'activated', 'dtmf_protocol', 'display_name'];
|
||||
|
||||
return Account::whereIn('id', function ($query) use ($request) {
|
||||
$query->select('contact_id')
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class AccountFactory extends Factory
|
|||
{
|
||||
return [
|
||||
'username' => $this->faker->username,
|
||||
'display_name' => $this->faker->username,
|
||||
'display_name' => $this->faker->name,
|
||||
'domain' => config('app.sip_domain'),
|
||||
'email' => $this->faker->email,
|
||||
'user_agent' => $this->faker->userAgent,
|
||||
|
|
|
|||
|
|
@ -99,6 +99,8 @@ class AccountProvisioningTest extends TestCase
|
|||
public function testAuthenticatedReProvisioning()
|
||||
{
|
||||
$password = Password::factory()->create();
|
||||
$password->account->display_name = "Anna O'Reily";
|
||||
$password->account->save();
|
||||
$password->account->generateApiKey();
|
||||
|
||||
$provisioningToken = $password->account->provisioning_token;
|
||||
|
|
@ -123,7 +125,7 @@ class AccountProvisioningTest extends TestCase
|
|||
->assertStatus(200)
|
||||
->assertHeader('Content-Type', 'application/xml')
|
||||
->assertSee($password->account->username)
|
||||
->assertSee($password->account->display_name)
|
||||
->assertSee($password->account->display_name, false)
|
||||
->assertSee('ha1');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue