# 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:** 4

<div class="post-metadata">

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

</div>

Yes, that looks roughly correct. I think you will need to change the two

```plaintext
message

```

lines to

```plaintext
return message

```

so that it stops execution of the function at that point.

What are you trying to achieve here? It might be possible to do something using the existing configuration options, rather than maintaining a fork of the plugin.

---

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