Skip to content

Commit 4ac4c0a

Browse files
authored
Merge pull request #28860 from nextcloud/backport/28822/stable22
[stable22] Add email addresses to contacts menu
2 parents 81cd110 + 74ba526 commit 4ac4c0a

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
@@ -165,6 +165,7 @@ public function jsonSerialize(): array {
165165
'topAction' => $topAction,
166166
'actions' => $otherActions,
167167
'lastMessage' => '',
168+
'emailAddresses' => $this->getEMailAddresses(),
168169
];
169170
}
170171
}

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' => ['[email protected]']
105106
];
106107

107108
$this->entry->setId(123);
108109
$this->entry->setFullName('Guadalupe Frisbey');
110+
$this->entry->addEMailAddress('[email protected]');
109111
$json = $this->entry->jsonSerialize();
110112

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

0 commit comments

Comments
 (0)