Merge pull request #28860 from nextcloud/backport/28822/stable22

[stable22] Add email addresses to contacts menu
This commit is contained in:
kesselb 2021-09-18 16:00:45 +02:00 committed by GitHub
commit 4ac4c0a94c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);