Render %{invitee_name} as full name only

When usernames are derived from emails (especially work emails), they often are very similar to the users real name. If the user has set their real name (and if real names are not hidden via site settings) this currently results in invite emails starting like this

John Doe (doe) invited you to join

As far as I can tell without any knowledge of ruby, this is where the John Doe (doe) part gets rendered:

I don’t see the benefit of mentioning the username at all if the real name is available. After all, you are inviting someone who is not yet a member (most of the time at least) and hence can’t relate to the username anyway. So I would like to change line 18 to

  invitee_name = "#{invite.invited_by.name}"

but I don’t know how to achieve this on my site and I’m also hesitant to fiddle with the core code. Is this a change that would make sense for the core? If not, could someone give me some hints how to make that change locally while maintaining upgradability?

BTW: why is the variable called invitee_name when “invitee” commonly designates the invited person, not the inviting person?


So, just to understand things better, does what I’m trying to do imply forking Discourse? I hope there is a simpler way for making such a minor change…

「いいね!」 8

私もこの問題について Contribute > Bug のトピックを作成しようとしていましたが、このトピックに便乗して +1 をつけます。

「Invitee」は確かに招待された人を指します。招待を行う側の人は inviter または invitor と呼ぶべきです。https://english.stackexchange.com/questions/327842/person-who-invites-inviter-or-invitor

招待のメールテンプレートを編集する際には特に混乱を招きます。私は %{invitee_name} が自分が招待する相手の名前を挿入するものだと思い、文面をそれに合わせて変更しましたが、実際には %{invitee_name} は招待を作成した人のユーザー名を挿入するため、招待文が全く意味を成さなくなりました。

私は、ユーザー名よりも利用可能な場合は氏名を使用するよう提案した元の投稿者(OP)に賛成です。ユーザー名は新規ユーザーにとって意味不明なものである場合があるからです。

しかし、%{invitee_name} を %{inviter_name} に変更する必要があります。なぜなら、現在の表記は非常に混乱を招き、不正確だからです。私がこれを実装できるかもしれませんので、もし PR(プルリクエスト)に興味があれば挑戦してみます。

「いいね!」 9

Yeah this is bad and wrong, you are 100% correct. Not sure who worked on this originally, but they got it wrong.

  • Invitee: person being invited

  • Inviter: person sending the invitation

Can you add to your list @techAPJ?

「いいね!」 6

What abour the main point of the OP? Do you intend to make that change too?

「いいね!」 1

Done via:

https://github.com/discourse/discourse/commit/0e0794dff9e23f5ee5ba5f68a8a04f08254b4790

and

https://github.com/discourse/discourse/commit/248ad5466d5009476fb7170e878096a3e343ec1c

「いいね!」 4

I have created a PR for this:

https://github.com/discourse/discourse/pull/5390

@codinghorror can merge if he agrees. :slight_smile:

「いいね!」 5

I disagree; you’ll need the username to mention the person properly. Also highly relevant if they are different:

Joe Smith @ninja

I don’t understand your point. Can you elaborate?

I think often both could be needed.

If the invite said codinghorror only and I knew Jeff personally I might not have any idea who codinghorror was and be reluctant to accept the invite.

If the invite said Jeff only and I knew Jeff personally I would be more likely to accept the invite, but I might not know that his member name was codinghorror.

「いいね!」 3

That part is covered: the proposal is only to skip username if real name is available, not the other way around.

I believe when you follow an invite link you get to see the name, username and avatar of the user who invited you. Is that not so?

「いいね!」 1

This topic was automatically closed after 33 hours. New replies are no longer allowed.