Add email addresses to contacts menu

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2021-09-13 22:39:04 +02:00
parent a994ef0c4f
commit 024881dbd3
No known key found for this signature in database
GPG key ID: 36E3664E099D0614
7 changed files with 9 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -6,6 +6,7 @@
<div class="body">
<div class="full-name">{{contact.fullName}}</div>
<div class="last-message">{{contact.lastMessage}}</div>
<div class="email-address">{{contact.emailAddresses}}</div>
</div>
{{#if contact.topAction}}
<a class="top-action" href="{{contact.topAction.hyperlink}}" title="{{contact.topAction.title}}">

View file

@ -165,6 +165,7 @@ class Entry implements IEntry {
'topAction' => $topAction,
'actions' => $otherActions,
'lastMessage' => '',
'emailAddresses' => $this->getEMailAddresses(),
];
}
}

View file

@ -96,16 +96,18 @@ class EntryTest extends TestCase {
public function testJsonSerialize() {
$expectedJson = [
'id' => 123,
'id' => '123',
'fullName' => 'Guadalupe Frisbey',
'topAction' => null,
'actions' => [],
'lastMessage' => '',
'avatar' => null,
'emailAddresses' => ['user@example.com']
];
$this->entry->setId(123);
$this->entry->setFullName('Guadalupe Frisbey');
$this->entry->addEMailAddress('user@example.com');
$json = $this->entry->jsonSerialize();
$this->assertEquals($expectedJson, $json);