The discussion revolves around improving the clarity of invite emails in Discourse by changing how the inviter’s name is displayed. tophee suggests rendering the invitee’s full name instead of the username in invite emails, arguing that the username is irrelevant for new users. pacharanero agrees, pointing out that the variable %{invitee_name} is misleading—it actually refers to the inviter, not the invitee, and should be renamed to %{inviter_name}. codinghorror supports the correction, confirming the naming error. techAPJ has already fixed the variable name and proposed a PR to display the full name when available, rather than the username techAPJ. codinghorror disagrees, arguing the username is necessary for identification, but tophee and Mittineague clarify that the proposal only omits the username if the real name is present, ensuring clarity without losing identification. The discussion highlights a UX improvement to make invites more intuitive.
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…
Es especialmente confuso al editar las plantillas de correo electrónico para las invitaciones: pensé que %{invitee_name} insertaría el nombre de la persona a la que estaba invitando, así que modifiqué las oraciones para reflejar esto, solo para que las invitaciones carecieran por completo de sentido, ya que %{invitee_name} en realidad insertaba el nombre de usuario de la persona que creó la invitación.
Apoyaría al autor original de este tema, quien sugirió el uso del nombre completo si está disponible, en lugar del nombre de usuario, que a veces puede ser un nombre de usuario opaco para el nuevo usuario.
Pero sí necesitamos cambiar %{invitee_name} por %{inviter_name} porque es extremadamente confuso e inexacto. Podría ser capaz de hacer este cambio, así que si te interesa un PR (solicitud de extracción), lo intentaré.
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.