Skip to content

Commit 4447b72

Browse files
authored
Merge pull request #28859 from nextcloud/backport/28822/stable21
[stable21] Add email addresses to contacts menu
2 parents 1280136 + 32ee325 commit 4447b72

File tree

7 files changed

+9
-5
lines changed

7 files changed

+9
-5
lines changed

core/js/dist/login.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/js/dist/login.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/js/dist/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/js/dist/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/src/OC/contactsmenu/contact.handlebars

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<div class="body">
77
<div class="full-name">{{contact.fullName}}</div>
88
<div class="last-message">{{contact.lastMessage}}</div>
9+
<div class="email-address">{{contact.emailAddresses}}</div>
910
</div>
1011
{{#if contact.topAction}}
1112
<a class="top-action" href="{{contact.topAction.hyperlink}}" title="{{contact.topAction.title}}">

lib/private/Contacts/ContactsMenu/Entry.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ public function jsonSerialize() {
162162
'topAction' => $topAction,
163163
'actions' => $otherActions,
164164
'lastMessage' => '',
165+
'emailAddresses' => $this->getEMailAddresses(),
165166
];
166167
}
167168
}

tests/lib/Contacts/ContactsMenu/EntryTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,18 @@ public function testSetGetProperties() {
9696

9797
public function testJsonSerialize() {
9898
$expectedJson = [
99-
'id' => 123,
99+
'id' => '123',
100100
'fullName' => 'Guadalupe Frisbey',
101101
'topAction' => null,
102102
'actions' => [],
103103
'lastMessage' => '',
104104
'avatar' => null,
105+
'emailAddresses' => ['user@example.com']
105106
];
106107

107108
$this->entry->setId(123);
108109
$this->entry->setFullName('Guadalupe Frisbey');
110+
$this->entry->addEMailAddress('user@example.com');
109111
$json = $this->entry->jsonSerialize();
110112

111113
$this->assertEquals($expectedJson, $json);

0 commit comments

Comments
 (0)