Skip to content

Commit 73f2ed8

Browse files
committed
updated event_context
1 parent ba74fdb commit 73f2ed8

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

osf/models/mixins.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
InvalidTagError,
2727
BlockedEmailError,
2828
)
29+
from website.settings import OSF_CONTACT_EMAIL, DOMAIN
2930
from .node_relation import NodeRelation
3031
from .nodelog import NodeLog
3132
from .notification import NotificationType, FrequencyChoices
@@ -1464,17 +1465,22 @@ def add_contributor(self, contributor, permissions=None, visible=True,
14641465
)
14651466

14661467
event_context = {
1467-
'project': {
1468+
'node': {
14681469
'id': self._id,
14691470
'title': self.title,
1470-
'url': getattr(self, 'url', ''),
14711471
'absolute_url': getattr(self, 'absolute_url', ''),
14721472
},
1473-
'contributor': {
1473+
'referrer_name': auth.user.fullname,
1474+
'user': {
14741475
'id': contrib_to_add._id,
14751476
'fullname': contrib_to_add.fullname,
14761477
'username': contrib_to_add.username,
14771478
},
1479+
'osf_contact_email': OSF_CONTACT_EMAIL,
1480+
'all_global_subscriptions_none': None,
1481+
'settings': {
1482+
'DOMAIN': DOMAIN
1483+
}
14781484
}
14791485

14801486
notification_type.emit(

0 commit comments

Comments
 (0)