Renaming discobot causes it to break

I just tried renaming @discobot locally and on a live site and doing so causes it to not function properly.

See the screen shot below to see what happens after I renamed it to @pizzabot:

4 Likes

We’re caching it so it’ll take a rebuild for it to work.

https://github.com/discourse/discourse/blob/9fac5e28a55c8ccde4f525cd074cc2c24f17b86e/plugins/discourse-narrative-bot/lib/discourse_narrative_bot/actions.rb#L5-L9

I’ll look into maybe adding an AR callback to burst the cache when the username changes.

10 Likes

Okay I can confirm that doing a rebuild after a rename causes it to work again. But unless I’m doing something wrong I still think there are issues after a rename.

If I send a PM directly to my renamed bot it works great. But if I respond in a topic or in a PM to just myself and mention the bot it doesn’t work:

Message to myself:

Responding in a topic:

PM to my renamed bot (this works)

2 Likes

Fixed in

https://github.com/discourse/discourse/commit/7028bdceed47cfa02faed55d10d25298f16acca4

7 Likes