Skip to content

Commit e3f9734

Browse files
user mentioning: diplay author instead of recipient (#13332)
1 parent c8c4750 commit e3f9734

5 files changed

Lines changed: 8 additions & 7 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{% load i18n %}{% blocktranslate trimmed %}
2-
User {{ user }} jotted a note on {{ section }}{% endblocktranslate %}:
2+
User {{ requested_by }} jotted a note on {{ section }}{% endblocktranslate %}:
33

44
{{ note }}

dojo/templates/notifications/mail/user_mentioned.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</p>
1010
<p>
1111
{% blocktranslate trimmed %}
12-
User {{ user }} jotted a note on {{ section }}:<br/>
12+
User {{ requested_by }} jotted a note on {{ section }}:<br/>
1313
<br/>
1414
{{ note }}<br/>
1515
<br/>

dojo/templates/notifications/msteams/user_mentioned.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ NOTE: This template is currently NOT USED in practice because:
5454
},
5555
{
5656
"type": "TextBlock",
57-
"text": "{% trans 'User' %} {{ user }} {% trans 'mentioned you in' %} {{ section }}.",
57+
"text": "{% trans 'User' %} {{ requested_by }} {% trans 'mentioned you in' %} {{ section }}.",
5858
"wrap": true,
5959
"spacing": "Medium"
6060
},
@@ -63,7 +63,7 @@ NOTE: This template is currently NOT USED in practice because:
6363
"facts": [
6464
{
6565
"title": "{% trans 'User' %}:",
66-
"value": "{{ user }}"
66+
"value": "{{ requested_by }}"
6767
},
6868
{
6969
"title": "{% trans 'Section' %}:",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{% load i18n %}{% blocktranslate trimmed %}
2-
User {{ user }} jotted a note on {{ section }}:
2+
User {{ requested_by }} jotted a note on {{ section }}:
33

44
{{ note }}
55

66
Full details of the note can be reviewed at {{ url }}
77
{% endblocktranslate %}
88
{% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %}
9-
9+
1010
{% trans "Disclaimer" %}:
1111
{{ system_settings.disclaimer_notifications }}
1212
{% endif %}

dojo/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1461,7 +1461,8 @@ def process_tag_notifications(request, note, parent_url, parent_title):
14611461
title=f"{request.user} jotted a note",
14621462
url=parent_url,
14631463
icon="commenting",
1464-
recipients=users_to_notify)
1464+
recipients=users_to_notify,
1465+
requested_by=get_current_user())
14651466

14661467

14671468
def encrypt(key, iv, plaintext):

0 commit comments

Comments
 (0)