# Allocating a response (comment)

**URL:** https://meta.discourse.org/t/allocating-a-response-comment/63054
**Category:** Development
**Created:** [May 20, 2017, 10:00am UTC](https://meta.discourse.org/t/allocating-a-response-comment/63054 "2017-05-20T10:00:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Stranik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stranik/32/85638_2.png) [@Stranik](https://meta.discourse.org/u/Stranik)
#### Post date: [May 20, 2017, 10:00am UTC](https://meta.discourse.org/t/allocating-a-response-comment/63054/1 "2017-05-20T10:00:36Z")

</div>

I try to bring out (for testing) posts that are comments.

```
import { withPluginApi } from 'discourse/lib/plugin-api';
import RawHtml from 'discourse/widgets/raw-html';

//TABLE posts: reply_to_post_number integer

function attachSignature(api) {
  api.includePostAttributes('reply_to_post_number');

  api.decorateWidget('post-contents:after-cooked', dec => {

    const attrs = dec.attrs;
    if (Ember.isEmpty(attrs.reply_to_post_number)) { return; }

    const currentUser = api.getCurrentUser();
    if (currentUser) {
    return new RawHtml({html: `<div class='reply-comm'>This is a comment on the number: ${attrs.reply_to_post_number}</div>`});
    
    
    }
  });
}

```

You can tell whether this code is written correctly?

Or I need to add a condition: `if reply_to_post_number > 1 (or 0, Null ...)`

Continuation: [Adding to the comment css tags](https://meta.discourse.org/t/adding-to-the-comment-css-tags/62611)
