Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
39e9335
Update for HumHub 1.19
yurabakhtin Feb 20, 2026
c33579e
Cleaning up REST error handling module as it is handled by core
yurabakhtin May 25, 2026
1682588
Enh: Updated Translations (translate.humhub.org)
May 30, 2026
a42b885
Merge branch 'master' into develop
luke- Jun 3, 2026
c19201a
Fix REST API module branch for tests
yurabakhtin Jun 4, 2026
472a4b8
Release 3.4.0
luke- Jun 4, 2026
8c4f5c0
Fix using of removed module property `isActivated` (#498)
yurabakhtin Jun 22, 2026
7ce57e3
Release 3.4.1
luke- Jun 22, 2026
0d0ba75
Update user image (#499)
yurabakhtin Jun 23, 2026
03af1b7
Add aria-label attribute for icon-only buttons (#500)
yurabakhtin Jun 25, 2026
180e438
Enh: Updated Translations (translate.humhub.org)
Jun 26, 2026
f8c7f32
Enh: Updated Translations (translate.humhub.org)
Jun 27, 2026
179a67d
Merge branch 'master' into develop
luke- Jul 8, 2026
9643e65
Release 3.4.2
luke- Jul 8, 2026
de0833f
Enh: Updated Translations (translate.humhub.org)
Jul 9, 2026
7e34566
Enh: Updated Translations (translate.humhub.org)
Jul 16, 2026
2a55375
- Enh: Add the number of unseen conversation messages to the push not…
marc-farre Jul 17, 2026
57fbf65
Add Silent Push notification to update Unread Notification Count in a…
marc-farre Jul 20, 2026
9dba53e
Merge branch 'master' into develop
luke- Jul 21, 2026
36fda55
Release 3.4.3
luke- Jul 21, 2026
5fdcb61
Enh: Updated Translations (translate.humhub.org)
Jul 22, 2026
03cd8d3
Merge branch 'develop' of github.com:humhub/mail into develop
Jul 22, 2026
f38ce17
Fix: "Write a message" too low on Android Chrome based browsers (#509)
marc-farre Jul 29, 2026
232ea51
Merge remote-tracking branch 'origin/master' into develop
luke- Jul 31, 2026
90cc9fb
Release 3.4.4
luke- Jul 31, 2026
fc8610c
[1.19.0-beta.2] Impersonate feature - deny access to Messenger and Pr…
marc-farre Aug 27, 2026
08fb625
Enh: Updated Translations (translate.humhub.org)
Aug 28, 2026
d48f70e
Merge branch 'develop' of github.com:humhub/mail into develop
Aug 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/codeception-min-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ jobs:
with:
module-id: mail
use-rest-module: true
rest-module-branch: develop
40 changes: 31 additions & 9 deletions Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace humhub\modules\mail;

use humhub\commands\IntegrityController;
use humhub\helpers\ControllerHelper;
use humhub\modules\mail\helpers\Url;
use humhub\modules\mail\models\Config;
use humhub\modules\mail\models\Message;
Expand All @@ -22,6 +23,7 @@
use humhub\modules\ui\menu\MenuLink;
use humhub\modules\user\widgets\HeaderControlsMenu;
use humhub\widgets\MetaSearchWidget;
use humhub\widgets\TopMenu;
use Yii;

/**
Expand Down Expand Up @@ -152,20 +154,23 @@ public static function onUserDelete($event)
public static function onTopMenuInit($event)
{
try {
if (Yii::$app->user->isGuest) {
if (Yii::$app->user->isGuest || !Yii::$app->user->impersonation->canAccessPrivateContent()) {
return;
}

/* @var TopMenu $menu */
$menu = $event->sender;

$module = Config::getModule();
// See https://github.com/humhub/humhub-modules-mail/issues/201
if (method_exists($module, 'hideInTopNav') && !$module->hideInTopNav()) {
$event->sender->addItem([
$menu->addEntry(new MenuLink([
'label' => Yii::t('MailModule.base', 'Messages'),
'url' => Url::toMessenger(),
'icon' => '<i class="fa fa-envelope"></i>',
'isActive' => (Yii::$app->controller->module && Yii::$app->controller->module->id == 'mail'),
'icon' => 'envelope',
'isActive' => ControllerHelper::isActivePath('mail'),
'sortOrder' => 300,
]);
]));
}
} catch (\Throwable $e) {
Yii::error($e);
Expand All @@ -175,23 +180,40 @@ public static function onTopMenuInit($event)
public static function onNotificationAddonInit($event)
{
try {
if (Yii::$app->user->isGuest) {
if (Yii::$app->user->isGuest || !Yii::$app->user->impersonation->canAccessPrivateContent()) {
return;
}

$event->sender->addWidget(NotificationInbox::className(), [], ['sortOrder' => 90]);
$event->sender->addWidget(NotificationInbox::class, [], ['sortOrder' => 90]);
} catch (\Throwable $e) {
Yii::error($e);
}
}

/**
* Adds the number of unseen conversation messages to the push notification
* badge count of the `fcm-push` module.
*
* @param \humhub\modules\fcmPush\events\NotificationCountEvent $event
*/
public static function onPushNotificationCount($event)
{
try {
$event->count += (int)UserMessage::getNewMessageCount($event->user->id);
} catch (\Throwable $e) {
Yii::error('Messenger - Error onPushNotificationCount: ' . $e);
}
}

public static function onProfileHeaderControlsMenuInit($event)
{
try {
/* @var HeaderControlsMenu $menu */
$menu = $event->sender;

if ($menu->user->isCurrentUser() || !Yii::$app->user->can(StartConversation::class)) {
if ($menu->user->isCurrentUser()
|| !Yii::$app->user->impersonation->canAccessPrivateContent()
|| !Yii::$app->user->can(StartConversation::class)) {
return;
}

Expand Down Expand Up @@ -244,7 +266,7 @@ public static function onRestApiAddRules()

public static function onMetaSearchWidgetInit($event)
{
if (Yii::$app->user->isGuest) {
if (Yii::$app->user->isGuest || !Yii::$app->user->impersonation->canAccessPrivateContent()) {
return;
}

Expand Down
14 changes: 0 additions & 14 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace humhub\modules\mail;

use humhub\components\console\Application as ConsoleApplication;
use humhub\modules\mail\models\MessageEntry;
use humhub\modules\mail\notifications\MailNotification;
use humhub\modules\mail\notifications\ConversationNotification;
Expand Down Expand Up @@ -40,19 +39,6 @@ class Module extends \humhub\components\Module
*/
public $conversationUpdatePageSize = 50;

/**
* @inheritdoc
*/
public function init()
{
parent::init();

if (Yii::$app instanceof ConsoleApplication) {
// Prevents the Yii HelpCommand from crawling all web controllers and possibly throwing errors at REST endpoints if the REST module is not available.
$this->controllerNamespace = 'mail/commands';
}
}

/**
* @return static
*/
Expand Down
1 change: 1 addition & 0 deletions config.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
['class' => IntegrityController::class, 'event' => IntegrityController::EVENT_ON_RUN, 'callback' => ['humhub\modules\mail\Events', 'onIntegrityCheck']],
['class' => 'humhub\modules\rest\Module', 'event' => 'restApiAddRules', 'callback' => ['humhub\modules\mail\Events', 'onRestApiAddRules']],
['class' => 'humhub\widgets\MetaSearchWidget', 'event' => 'init', 'callback' => ['humhub\modules\mail\Events', 'onMetaSearchWidgetInit']],
['class' => 'humhub\modules\fcmPush\services\MessagingService', 'event' => 'pushNotificationCount', 'callback' => ['humhub\modules\mail\Events', 'onPushNotificationCount']], // humhub\modules\fcmPush\services\MessagingService::EVENT_NOTIFICATION_COUNT
],
];
3 changes: 1 addition & 2 deletions controllers/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@

namespace humhub\modules\mail\controllers;

use Yii;
use humhub\modules\mail\models\Config;
use humhub\models\Setting;
use Yii;

/**
* ConfigController handles the configuration requests.
Expand Down
1 change: 1 addition & 0 deletions controllers/InboxController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ protected function getAccessRules()
{
return [
[ControllerAccess::RULE_LOGGED_IN_ONLY],
[ControllerAccess::RULE_DENY_IMPERSONATED],
];
}

Expand Down
3 changes: 2 additions & 1 deletion controllers/MailController.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ protected function getAccessRules()
{
return [
[ControllerAccess::RULE_LOGGED_IN_ONLY],
[ControllerAccess::RULE_DENY_IMPERSONATED],
[ControllerAccess::RULE_PERMISSION => StartConversation::class, 'actions' => ['create', 'add-user']],
];
}
Expand Down Expand Up @@ -308,7 +309,7 @@ private function findUserByFilter($keyword, $maxResult)
$userInfo = [];
$userInfo['guid'] = $user->guid;
$userInfo['displayName'] = Html::encode($user->displayName);
$userInfo['image'] = $user->getProfileImage()->getUrl();
$userInfo['image'] = $user->image->getUrl();
$userInfo['link'] = $user->getUrl();
$results[] = $userInfo;
}
Expand Down
1 change: 1 addition & 0 deletions controllers/TagController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ protected function getAccessRules()
{
return [
[ControllerAccess::RULE_LOGGED_IN_ONLY],
[ControllerAccess::RULE_DENY_IMPERSONATED],
];
}

Expand Down
26 changes: 26 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
Changelog
=========

3.4.5 (Unreleased)
------------------
- Enh #510: Deny access to the Messenger while an admin impersonates a user, since conversations are private content — requires core 1.19 and can be disabled with the core `\humhub\modules\user\components\Impersonation::$allowPrivateContentAccess` option (humhub/humhub#8372)

3.4.4 (July 31, 2026)
---------------------
- Fix #509: "Write a message" too low on Android Chrome based browsers

3.4.3 (July 21, 2026)
---------------------
- Enh #506: Add the number of unseen conversation messages to the push notification badge count (requires `fcm-push` 2.2.9+)
- Enh #507: Trigger the new core `UnreadCountChangedEvent` when a conversation is marked as seen/unread or replied to, so the push notification badge count is refreshed (requires `fcm-push` 2.2.9+)

3.4.2 (July 8, 2026)
--------------------
- Fix #499: Update user image
- Enh #500: Add aria-label attribute for icon-only buttons

3.4.1 (June 22, 2026)
---------------------
- Fix #498: Fix use of removed module property `isActivated`

3.4.0 (June 5, 2026)
--------------------
- Enh #483: Update for HumHub 1.19

3.3.12 (July 16, 2026)
----------------------
- Fix #504: Message entries overflow horizontally on iOS Safari
Expand Down
6 changes: 4 additions & 2 deletions messages/am/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
'Cancel' => 'ይቅር',
'Confirm' => 'አረጋግጥ',
'Delete' => 'አስወግድ',
'Disabled' => 'የማይሰራ',
'Edit' => 'ማስተካከያ',
'Filter' => 'አጣራ',
'Message' => 'መልዕክት',
'Pinned' => 'የተሰካ',
'Search' => 'ፈልግ',
'Subject' => 'ርዕስ',
'Title' => 'ርዕስ',
'Unpin' => 'ንቀል',
'User' => 'ተጠቃሚ',
'<strong>Confirm</strong> deleting conversation' => '',
Expand All @@ -37,13 +37,14 @@
'Created At' => '',
'Created By' => '',
'Delete conversation' => '',
'Disabled' => '',
'Do you really want to delete this conversation?' => '',
'Do you really want to delete this message?' => '',
'Do you really want to delete this tag?' => '',
'Do you really want to leave this conversation?' => '',
'Edit conversation subject' => '',
'Edit message entry' => '',
'Edit message...' => '',
'Edit subject' => '',
'Friday' => '',
'Here you can manage your private conversation tags.' => '',
'Is Originator' => '',
Expand All @@ -69,6 +70,7 @@
'Receive Notifications when someone sends you a message.' => '',
'Receive private messages' => '',
'Recipient' => '',
'Reply' => '',
'Reply now' => '',
'Required' => '',
'Saturday' => '',
Expand Down
4 changes: 3 additions & 1 deletion messages/an/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
'Subject' => 'Asunto',
'Tags' => 'Etiquetas',
'There are no messages yet.' => 'Encara no i hai mensaches',
'Title' => 'Títol',
'Unpin' => 'Des-fixar',
'Updated At' => 'Actualizau o',
'Updated By' => 'Actualizau per',
Expand Down Expand Up @@ -53,7 +52,9 @@
'Do you really want to delete this message?' => '',
'Do you really want to delete this tag?' => '',
'Do you really want to leave this conversation?' => '',
'Edit conversation subject' => '',
'Edit message...' => '',
'Edit subject' => '',
'Friday' => '',
'Here you can manage your private conversation tags.' => '',
'Is Originator' => '',
Expand All @@ -77,6 +78,7 @@
'Receive Notifications when someone opens a new conversation.' => '',
'Receive Notifications when someone sends you a message.' => '',
'Receive private messages' => '',
'Reply' => '',
'Reply now' => '',
'Required' => '',
'Saturday' => '',
Expand Down
10 changes: 6 additions & 4 deletions messages/ar/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
'Created At' => 'أنشئت في',
'Created By' => 'تم وضعه بواسطة',
'Delete' => 'حذف',
'Disabled' => 'غير مفعل',
'Do you really want to delete this conversation?' => 'هل تريد حذف هذه المحادثة؟',
'Do you really want to delete this message?' => 'هل تريد حذف هذه الرسالة؟',
'Do you really want to leave this conversation?' => 'هل تريد مغادرة هذه المحادثة؟',
Expand All @@ -23,10 +24,13 @@
'Messages' => 'الرسائل',
'Monday' => 'الاثنين',
'New message from {senderName}' => 'رسالة جديدة من {senderName}',
'Optional' => 'اختياري',
'Participants' => 'المشاركون',
'Pinned' => 'تثبيت',
'Recipient' => 'المستلم',
'Reply' => 'رد',
'Reply now' => 'اضف رد',
'Required' => 'مطلوب',
'Saturday' => 'السبت',
'Search' => 'بحث',
'Send' => 'ارسال',
Expand All @@ -37,7 +41,6 @@
'Tags' => 'الأوسمة',
'There are no messages yet.' => 'لا توجد رسائل',
'Thursday' => 'الخميس',
'Title' => 'العنوان',
'Today' => 'اليوم',
'Tuesday' => 'الثلاثاء',
'Unpin' => 'إلغاء التثبيت',
Expand All @@ -63,9 +66,10 @@
'Conversation tags can be used to filter conversations and are only visible to you.' => '',
'Conversations' => '',
'Delete conversation' => '',
'Disabled' => '',
'Do you really want to delete this tag?' => '',
'Edit conversation subject' => '',
'Edit message...' => '',
'Edit subject' => '',
'Here you can manage your private conversation tags.' => '',
'Is Originator' => '',
'Last Viewed' => '',
Expand All @@ -79,12 +83,10 @@
'Max number of new conversations allowed for a user per day' => '',
'My Tags' => '',
'New conversation from {senderName}' => '',
'Optional' => '',
'Pin' => '',
'Receive Notifications when someone opens a new conversation.' => '',
'Receive Notifications when someone sends you a message.' => '',
'Receive private messages' => '',
'Required' => '',
'Seperate restrictions for new users' => '',
'Show menu item in top Navigation' => '',
'Start new conversations' => '',
Expand Down
10 changes: 6 additions & 4 deletions messages/bg/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
'Created By' => 'Създадено от',
'Delete' => 'Изтрий',
'Delete conversation' => 'Изтрий обсъждането',
'Disabled' => 'Деактивиран',
'Do you really want to delete this conversation?' => 'Наистина ли искаш да изтриеш обсъждането?',
'Do you really want to delete this message?' => 'Наистина ли искаш да изтриеш съобщението?',
'Do you really want to delete this tag?' => 'Наистина ли искаш да изтриеш този етикет?',
Expand All @@ -50,13 +51,16 @@
'Monday' => 'Понеделник',
'My Tags' => 'Моите етикети',
'New message from {senderName}' => 'Ново съобщение от {senderName}',
'Optional' => 'По желание',
'Participants' => 'Участници',
'Pinned' => 'Фиксирано',
'Receive Notifications when someone opens a new conversation.' => 'Получи съобщение, когато някой отвори ново обсъждане.',
'Receive Notifications when someone sends you a message.' => 'Получи съобщение, когато някой ти изпрати съобщение.',
'Receive private messages' => 'Получавай лични съобщения',
'Recipient' => 'Получател',
'Reply' => 'Отговор',
'Reply now' => 'Отговори сега',
'Required' => 'Задължително',
'Saturday' => 'Събота',
'Search' => 'Търси',
'Send' => 'Изпрати',
Expand All @@ -71,7 +75,6 @@
'There are no messages yet.' => 'Все още нямате съобщения.',
'This user is already participating in this conversation.' => 'Този потребител вече присъства в обсъждането.',
'Thursday' => 'Четвъртък',
'Title' => 'Заглавие',
'Today' => 'Днес',
'Tuesday' => 'Вторник',
'Unpin' => 'Освободи',
Expand All @@ -93,12 +96,11 @@
'<strong>Messenger</strong> module configuration' => '',
'<strong>New</strong> conversation' => '',
'Advanced Messages Search' => '',
'Disabled' => '',
'Edit conversation subject' => '',
'Edit subject' => '',
'Mark Unread' => '',
'New conversation from {senderName}' => '',
'Optional' => '',
'Pin' => '',
'Required' => '',
'Yesterday' => '',
'You are not allowed to participate in this conversation. You have been blocked by: {userNames}.' => '',
'You are not allowed to reply to users {userNames}!' => '',
Expand Down
Loading
Loading