phabulous icon indicating copy to clipboard operation
phabulous copied to clipboard

Keep slack bot and auto messages consistent

Open dvcrn opened this issue 9 years ago • 14 comments
trafficstars

I just found this bot and gave it a spin though I'm a little bit confused about the way it handles:

screen shot 2016-02-26 at 8 50 39 am

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

dvcrn avatar Feb 25 '16 23:02 dvcrn

@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.

azenla avatar Mar 02 '16 22:03 azenla

oh I didn't know that. Let me give that a try

dvcrn avatar Mar 03 '16 00:03 dvcrn

Hm. Sounds like an easy fix. Will try to work on it during the weekend,

etcinit avatar Mar 03 '16 00:03 etcinit

@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.

azenla avatar Mar 03 '16 00:03 azenla

:+1:

etcinit avatar Mar 03 '16 00:03 etcinit

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 avatar Mar 03 '16 03:03 etcinit

@etcinit :D Awesome, thanks.

azenla avatar Mar 03 '16 03:03 azenla

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.

sinantaifour avatar Apr 17 '16 20:04 sinantaifour

@staii Noticed this too. @etcinit, it seems to not be working.

azenla avatar Apr 23 '16 04:04 azenla

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 avatar Apr 23 '16 23:04 etcinit

@etcinit Thanks

azenla avatar Apr 24 '16 00:04 azenla

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.

sinantaifour avatar Apr 24 '16 16:04 sinantaifour

@staii: Thanks for the examples! I'll take a look soon.

etcinit avatar Apr 27 '16 16:04 etcinit

@staii can you confirm that this issue still exists?

schemar avatar Mar 12 '18 18:03 schemar