# Bug OP-5559 - Unable to subscribe to member_updated or member_removed notifications

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-5559

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 10.0.0 |
| Observed in versions | 8.2.0 |
| Sprint | 10.0.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 8.2.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

Steps to Reproduce:

1.  Create and activate an OpenProject Plugin.
2.  Add an initializer to listen to either the ‘member\_updated’ or ‘member\_removed’ notification event.
3.  Trigger the event in the UI (add or remove a member)

**Actual Behavior**  
The subscribed notification is not triggered in the plugin.

**Expected Behavior**  
The subscribed notification would be triggered in the plugin.

**Additional Details**  
When a subscription is created using OpenProject::Notifications.subscribe is created, the name argument is expected to be a string, this is actually enforced on line 56 of lib/open\_project/notifications.rb by name.to\_s.

However, it appears that the methods save\_notification and destroy\_notification in app/models/member.rb are passing in a symbol (:member\_updated and :member\_removed) to the Notification.send methods _that is not being cast to string_, the send method is simply passing the symbol down to the active\_support library and because the initial subscribe (see above) is cast to string, you can never successfully subscribe to the member\_updated or member\_removed.

It seems a simple fix would be to pass member\_updated and member\_removed as strings rather than symbols (since this is what OpenProject::Notifications.subscribe is expecting as a name, a string).
