# Checking if post or thread - Ruby

**URL:** <https://meta.discourse.org/t/checking-if-post-or-thread-ruby/116437>\
**Category:** Development\
**Created:** [April 30, 2019, 1:37pm UTC](https://meta.discourse.org/t/checking-if-post-or-thread-ruby/116437 "2019-04-30T13:37:52Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![jackkelly-bayliss](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jackkelly-bayliss/32/139749_2.png) [@jackkelly-bayliss](https://meta.discourse.org/u/jackkelly-bayliss)\
**Post date:** [April 30, 2019, 1:37pm UTC](https://meta.discourse.org/t/checking-if-post-or-thread-ruby/116437/1 "2019-04-30T13:37:52Z")

</div>

Hello fellow Discourse users,

I’m currently attempting to build upon an already existing plugin called ‘discourse-chat-integration’ for which I’ve forked and attempted to customize for a certain community but I’m having a wee mind blank. How would I specifically test if it’s a post or thread? I’m trying to build two seperate notification blocks, one for a post and another for a thread.

I have attempted to find it already with ‘post\_number’ but it doesn’t seem to work. Any ideas? Thank you.

GitHub Link: [GitHub - jackkelly-bayliss/invictus-discourse-chat-integration · GitHub](https://github.com/jackkelly-bayliss/invictus-discourse-chat-integration)  
File Name: [invictus-discourse-chat-integration/lib/discourse\_chat/provider/discord/discord\_provider.rb at master · jackkelly-bayliss/invictus-discourse-chat-integration · GitHub](https://github.com/jackkelly-bayliss/invictus-discourse-chat-integration/blob/master/lib/discourse_chat/provider/discord/discord_provider.rb)

---

_[View the full topic](https://meta.discourse.org/t/checking-if-post-or-thread-ruby/116437)._
