diff --git a/application/controllers/ContactsController.php b/application/controllers/ContactsController.php index df0b1adf5..c2e1e29e2 100644 --- a/application/controllers/ContactsController.php +++ b/application/controllers/ContactsController.php @@ -42,14 +42,8 @@ public function init() public function indexAction() { - $contacts = Contact::on($this->db); - - $contacts->withColumns( - [ - 'has_email', - 'has_rc' - ] - ); + $contacts = Contact::on($this->db) + ->withColumns('has_email'); $limitControl = $this->createLimitControl(); $paginationControl = $this->createPaginationControl($contacts); diff --git a/library/Notifications/Model/Behavior/HasAddress.php b/library/Notifications/Model/Behavior/HasAddress.php index 785840757..2e7db3fcf 100644 --- a/library/Notifications/Model/Behavior/HasAddress.php +++ b/library/Notifications/Model/Behavior/HasAddress.php @@ -30,7 +30,7 @@ public function setQuery(Query $query) public function rewriteColumn($column, ?string $relation = null) { if ($this->isSelectableColumn($column)) { - $type = $column === 'has_email' ? 'email' : 'rocketchat'; + $type = 'email'; $subQueryRelation = $relation !== null ? $relation . '.contact.contact_address' : 'contact.contact_address'; @@ -53,7 +53,7 @@ public function rewriteColumn($column, ?string $relation = null) public function isSelectableColumn(string $name): bool { - return $name === 'has_email' || $name === 'has_rc'; + return $name === 'has_email'; } public function rewriteColumnDefinition(ColumnDefinition $def, string $relation): void @@ -61,9 +61,7 @@ public function rewriteColumnDefinition(ColumnDefinition $def, string $relation) $name = $def->getName(); if ($this->isSelectableColumn($name)) { - $label = $name === 'has_email' ? t('Has Email Address') : t('Has Rocket.Chat Username'); - - $def->setLabel($label); + $def->setLabel(t('Has Email Address')); } } @@ -72,7 +70,7 @@ public function rewriteCondition(Filter\Condition $condition, $relation = null) $column = substr($condition->getColumn(), strlen($relation)); if ($this->isSelectableColumn($column)) { - $type = $column === 'has_email' ? 'email' : 'rocketchat'; + $type = 'email'; $subQuery = $this->query->createSubQuery(new ContactAddress(), $relation) ->limit(1) diff --git a/library/Notifications/Model/Channel.php b/library/Notifications/Model/Channel.php index a1f8e24c8..f2e1777e5 100644 --- a/library/Notifications/Model/Channel.php +++ b/library/Notifications/Model/Channel.php @@ -69,13 +69,13 @@ public function getIcon(): Icon { switch ($this->type) { case 'rocketchat': - $icon = new Icon('rocketchat'); + $icon = new Icon('comment-dots'); break; case 'email': $icon = new Icon('envelope'); break; default: - $icon = new Icon('comment-dots'); + $icon = new Icon('comments'); //TODO: what should be the default icon } return $icon; diff --git a/library/Notifications/Widget/ItemList/ContactListItem.php b/library/Notifications/Widget/ItemList/ContactListItem.php index a69178568..c065e96f0 100644 --- a/library/Notifications/Widget/ItemList/ContactListItem.php +++ b/library/Notifications/Widget/ItemList/ContactListItem.php @@ -47,10 +47,6 @@ protected function assembleFooter(BaseHtmlElement $footer): void $contactIcons->addHtml(new Icon('envelope')); } - if ($this->item->has_rc) { - $contactIcons->addHtml(new Icon('comment-dots')); - } - $footer->addHtml($contactIcons); }