Adding mentions support to Steem.rocks

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@emrebeyler·
0.000 HBD
Adding mentions support to Steem.rocks

<center><img src="https://steemit-production-imageproxy-thumbnail.s3.amazonaws.com/U5dsq2YMs3MqWYs3ahtfEoCV36fF6xW_1680x8400"></center>

Yesterday, @favcau suggested we should log mentions and show the users on the activity feed. Even though I have that in my mind for a while, *Mention**is not actually an operation like posting comments, voting etc. in the blockchain, so it will be different to implement. 

### Adding the mentions support

After a quick workaround, I have implemented a virtual operation in the [steemrocks codebase](https://github.com/emre/steemrocks/pull/15).

I have used this regex pattern to catch usernames:

<img src="https://i.hizliresim.com/DyLyLo.png">
***

If anyone has a better pattern to catch usernames, I would be pleased to hear it.

#### Testing

- Posted a comment to @omersurer

<img src="https://i.hizliresim.com/nJvJvN.png">
***

- Saw it on both [my profile](http://steem.rocks/emrebeyler) and [omersurer's profile](http://steem.rocks/omersurer).

<img src="https://i.hizliresim.com/vJ0J0A.png">
***

Let me know if you have any issues with the mentions.

**Note: steemrocks has a node replay on progress. Database crashed today due to huge activity size. It will be recovered soon.**


👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,