# 在个人消息列表中显示收件人姓名

**URL:** <https://meta.discourse.org/t/show-recipient-name-in-personal-message-list/107116>\
**Category:** Support\
**Created:** [2019年一月21日 17:44 UTC](https://meta.discourse.org/t/show-recipient-name-in-personal-message-list/107116 "2019-01-21T17:44:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bokos](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@bokos](https://meta.discourse.org/u/bokos)\
**Post date:** [2019年一月21日 17:44 UTC](https://meta.discourse.org/t/show-recipient-name-in-personal-message-list/107116/1 "2019-01-21T17:44:53Z")

</div>

I need to show the name of the recipient of a personal message in the personal messages list.  
If your pm didn’t have a reply from the recipient yet it will only show the sender as the last participant.  
This confuses most of my members because they send several mostly identical messages with the same subject and would need to open each message to see which member they sent it to.  
Those messages are private so multiple recipients won’t do.  
An example would be managing secret santas. Each member gets a message containing different mailing addresses, but they shouldn’t know who is the secret santa of whom. All messages are titled “Your secret santa”.  
Is it possible to get a single recipient and then display it? Plugin or theme edit maybe?

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2019年一月23日 11:02 UTC](https://meta.discourse.org/t/show-recipient-name-in-personal-message-list/107116/2 "2019-01-23T11:02:14Z")

</div>

I’ve heard this before (there may be a topic on meta about it already) and I am sympathetic. Not sure how hard it will be to do, as this behavior should be quite specific to PMs.

Can you evaluate the difficulty of doing this @vinothkannans in the context of a person’s PM “topic list” page only?

---

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [2019年一月23日 11:52 UTC](https://meta.discourse.org/t/show-recipient-name-in-personal-message-list/107116/4 "2019-01-23T11:52:55Z")

</div>

I think it’s not a difficult one. Currently we only displaying the participants in the PM topic list. If participants count is less than 5 then we can add `allowed_users` and/or `allowed_groups` into the list. So the recipient’s avatar will be displayed even if they’re not replied. In this case we don’t need any major UX change.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2019年一月24日 08:01 UTC](https://meta.discourse.org/t/show-recipient-name-in-personal-message-list/107116/5 "2019-01-24T08:01:30Z")

</div>

OK if it is low risk, make the change, but be _sure_ it is specific to PM topic list please 😉

---

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [2019年一月25日 14:19 UTC](https://meta.discourse.org/t/show-recipient-name-in-personal-message-list/107116/7 "2019-01-25T14:19:31Z")

</div>

It’s done. Now the recipient’s avatar will be included in the PM list even if they not yet participated.

[https://github.com/discourse/discourse/commit/2d6aa2aea2b04a5a0aab16187737e444364ad12e](https://github.com/discourse/discourse/commit/2d6aa2aea2b04a5a0aab16187737e444364ad12e)

P.S. Also did [some cleanup to remove unused codes](https://github.com/discourse/discourse/commit/65caf04ddc3bb4edb99e66ce7f86fb73b28d607f).

---

<div class="post-metadata">

**Author:** ![bokos](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@bokos](https://meta.discourse.org/u/bokos)\
**Post date:** [2019年一月27日 09:24 UTC](https://meta.discourse.org/t/show-recipient-name-in-personal-message-list/107116/8 "2019-01-27T09:24:55Z")

</div>

Thank you!  
I think the mobile view still shows only the username of the sender when there was no reply. (Sent messages list). Since there is only space for one username, would it be possible to just show the first recipient?

---

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [2019年一月28日 08:49 UTC](https://meta.discourse.org/t/show-recipient-name-in-personal-message-list/107116/9 "2019-01-28T08:49:06Z")

</div>

Sure, I will improve it too. Added to my list 📝.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2022年一月30日 20:33 UTC](https://meta.discourse.org/t/show-recipient-name-in-personal-message-list/107116/11 "2022-01-30T20:33:58Z")

</div>


