Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a group to a Team doesn't trigger chat notifications for added members #14180

Open
miaulalala opened this issue Jan 23, 2025 · 1 comment
Labels
1. to develop bug feature: api 🛠️ OCS API for conversations, chats and participants feature: conversations 👥 feature: integration 📦 Integration with 3rd party (chat) service

Comments

@miaulalala
Copy link
Contributor

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Add a Team to a chat
  2. Later, add a group to the Team

Expected behaviour

As with sub- Teams, the group add creates chat messages for the added user.
Example - adding a sub Team to a Team that is already a member of the chat:

Image

Actual behaviour

No chat notifications are generated and the users are added silently.

Talk app

Talk app version: 21.0.0-beta2

Custom Signaling server configured: yes/no and version (see Talk administration settings: /index.php/settings/admin/talk#signaling_server) yes

Custom TURN server configured: yes/no (see Talk administration settings: /index.php/settings/admin/talk#turn_server)

Custom STUN server configured: yes/no (see Talk administration settings: /index.php/settings/admin/talk#stun_server)

Browser

Microphone available: yes

Camera available: yes

Operating system: Ubuntu

Browser name: Firefox

Browser version: 133

Browser log

``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```

Server configuration

Operating system: Ubuntu

Web server: Apache

Database: Maria

PHP version: 8.3

Nextcloud Version: Hub10/31 beta4

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your server installation folder

Nextcloud configuration:

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

Server log (data/nextcloud.log)

Insert your server log here
@nickvergessen
Copy link
Member

That should not trigger a chat notification but an invite one

Normal code is in

protected function generateInvitation(Room $room, array $attendees): void {
if ($room->getObjectType() === Room::OBJECT_TYPE_FILE) {
return;
}
$actor = $this->userSession->getUser();
if (!$actor instanceof IUser) {
return;
}
$actorId = $actor->getUID();
$notification = $this->notificationManager->createNotification();
$shouldFlush = $this->notificationManager->defer();
$dateTime = $this->timeFactory->getDateTime();
try {
$notification->setApp(Application::APP_ID)
->setDateTime($dateTime)
->setObject('room', $room->getToken())
->setSubject('invitation', [
'actorId' => $actor->getUID(),
]);
} catch (\InvalidArgumentException $e) {
$this->logger->error($e->getMessage(), ['exception' => $e]);
if ($shouldFlush) {
$this->notificationManager->flush();
}
return;
}
foreach ($attendees as $attendee) {
if ($attendee->getActorType() !== Attendee::ACTOR_USERS) {
// No user => no activity
continue;
}
if ($actorId === $attendee->getActorId()) {
// No activity for self-joining and the creator
continue;
}
try {
$notification->setUser($attendee->getActorId());
$this->notificationManager->notify($notification);
} catch (\InvalidArgumentException $e) {
$this->logger->error($e->getMessage(), ['exception' => $e]);
}
}
if ($shouldFlush) {
$this->notificationManager->flush();
}
}

but currently any non-user things from teams are ignored:

if ($member->getUserType() !== Member::TYPE_USER || $member->getUserId() === '') {
// Not a user?
return;
}

@nickvergessen nickvergessen added this to the 🌿 Next Beta (31) milestone Jan 23, 2025
@nickvergessen nickvergessen added 1. to develop feature: api 🛠️ OCS API for conversations, chats and participants feature: integration 📦 Integration with 3rd party (chat) service feature: conversations 👥 and removed 0. Needs triage labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop bug feature: api 🛠️ OCS API for conversations, chats and participants feature: conversations 👥 feature: integration 📦 Integration with 3rd party (chat) service
Projects
None yet
Development

No branches or pull requests

2 participants