phabulous
phabulous copied to clipboard
Keep slack bot and auto messages consistent
I just found this bot and gave it a spin though I'm a little bit confused about the way it handles:

In particular:
- Can I tell it to actually use the bot to post messages? Right now it's doing a direct slack API push to post a message
- Related to that, can I change the icon of it? It just seems odd to have 2 phabricator bots with 2 different names and 2 different icons posting stuff in the same channel
@etcinit This is probably an accident due to usage of 'username' in https://api.slack.com/methods/chat.postMessage - If you don't specify it, it will use the bot user, which will make things consistent.
oh I didn't know that. Let me give that a try
Hm. Sounds like an easy fix. Will try to work on it during the weekend,
@etcinit if I get a chance I will PR it. I set this bot up at my company, lots of people <3 it times 5000. Thanks for the awesome work.
:+1:
On origin/develop, I've added the option to tell the bot to only post messages through the RTM user. This should resolve the inconsistency problem.
However, there are two limitations from the Slack API:
- So far the bot has been able to post notifications on channels without being invited. With the setting set to
true, the bot will only be able to post on channels it is invited to. - The bot cannot automatically change it's profile information, so how it looks (name, image) depends entirely on how the user sets it up.
Relevant setting: https://github.com/etcinit/phabulous/blob/eae12b5c4edbe94bbbaadfce5007e5cd9cb22cd1/config/main.yml#L20
You should be able to pull that branch and try out building it. I'll include this changes on the next release.
@etcinit :D Awesome, thanks.
I have build the code on origin/develop, kept the flag as true in the YAML file, but the bot is still not posting as itself.
@staii Noticed this too. @etcinit, it seems to not be working.
I noticed the as-user flag wasn't being passed around everywhere it needed to be. ad0d74a should patch the bot to follow the as-user setting for most messages.
@etcinit Thanks
I built after your latest commit, and it still doesn't work.
Let me know if I need to provide anything for debugging.
I've so far seen two messages, both weren't sent as the user. The user is definitely in the channel. One message was "Hi! Phabulous v2 reporting for duty!", and the other was an updated on a differential entry.
@staii: Thanks for the examples! I'll take a look soon.
@staii can you confirm that this issue still exists?