# Distinguish private messages from posts?

**URL:** <https://meta.discourse.org/t/distinguish-private-messages-from-posts/51468>\
**Category:** Development\
**Created:** [12 أكتوبر 2016، 9:12م UTC](https://meta.discourse.org/t/distinguish-private-messages-from-posts/51468 "2016-10-12T21:12:09Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![tim.smith](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tim.smith/32/119954_2.png) [@tim.smith](https://meta.discourse.org/u/tim.smith)\
**Post date:** [12 أكتوبر 2016، 9:12م UTC](https://meta.discourse.org/t/distinguish-private-messages-from-posts/51468/1 "2016-10-12T21:12:09Z")

</div>

In a server-side ruby plugin, I’m using `DiscourseEvent.on("post_created")` to get data on post replies. However, this is also being triggered when a person replies to a private message. Unfortunately, I can’t see any attributes on the event objects that allow me to distinguish a reply to a topic from a reply in a PM conversation. The `archetype` property is set to “regular” in both of these cases.

Does anyone have any ideas how to distinguish a private message reply from other messages?

---

_[View the full topic](https://meta.discourse.org/t/distinguish-private-messages-from-posts/51468)._
