Slack-Twitter
Slack-Twitter copied to clipboard
Unable to Auto-Tweet Slack Messages Posted by Bots
I have had no luck trying to modify things so that bot messages posted to the channel are tweeted.
I tried removing the message.subtype != 'bot_message'
line from the code below to no avail.
if (message.channel == the_channel.id && (message.subtype != 'message_changed' && message.subtype != 'bot_message' && message.subtype != 'channel_join')) {
That sounds like a feature request, that is, to make bot tweets a setting rather than hard-coded. That's partly a remnant of (originally) having a single channel for posting & reading. Otherwise, timeline tweets would get RTed, hilariously. A heisenbug forced me to work around it by splitting it up into two channels.
What's your use case? I'm just curious, since it sounds like this is something I can add.
I want to tweet VCS commits and other automated development notifications integrated with Slack for an open development thing.
Regards, Bradley Weiers (Sent from mobile device)
On Jul 8, 2015, at 4:40 PM, Richard Eriksson [email protected] wrote:
That sounds like a feature request, that is, to make bot tweets a setting rather than hard-coded. That's partly a remnant of (originally) having a single channel for posting & reading. Otherwise, timeline tweets would get RTed, hilariously. A heisenbug forced me to work around it by splitting it up into two channels.
What's your use case? I'm just curious, since it sounds like this is something I can add.
— Reply to this email directly or view it on GitHub.
Is this for an integration?
The bot messages I'm able to do a console.log on, the message.subtype
property is undefined. That never felt right to me, since I expected it to have "bot_message" as a value. https://api.slack.com/events/message/bot_message
I'll see if I can pull together some tests to make a support call to Slack's API team.
I'm not building a new integration. Just using Slack's existing integrations to automate tweets for certain events related to development progress on software so that our users and testers can stay in the loop with Twitter. This seemed like a really fast way to do it at the beginning.
On Wed, Jul 8, 2015 at 11:41 PM, Richard Eriksson [email protected] wrote:
Is this for an integration?
The bot messages I'm able to do a console.log on, the message.subtype property is undefined. That never felt right to me, since I expected it to have "bot_message" as a value. https://api.slack.com/events/message/bot_message
I'll see if I can pull together some tests to make a support call to Slack's API team.
— Reply to this email directly or view it on GitHub https://github.com/sillygwailo/Slack-Twitter/issues/15#issuecomment-119805039 .
Regards,
Bradley Weiers
Yeah, existing integration is what I meant. I'll see what I can figure out.
Perhaps it's because the current solution uses a 'Bot' instead of a 'Slackbot'?
On Thu, Jul 9, 2015 at 1:50 AM, Richard Eriksson [email protected] wrote:
Yeah, existing integration is what I meant. I'll see what I can figure out.
— Reply to this email directly or view it on GitHub https://github.com/sillygwailo/Slack-Twitter/issues/15#issuecomment-119828247 .
Regards,
Bradley Weiers
Any word from the Slack guys?
I just sent a support request to them asking how to tell if a message was posted by a bot integration. I did just get a 'bot_message'
but that was from Slackbot. I never get it from any of my own integrations that are bot integrations.
Any response from them?
On Wed, Jul 22, 2015 at 4:37 PM, Richard Eriksson [email protected] wrote:
I just sent a support request to them asking how to tell if a message was posted by a bot integration. I did just get a 'bot_message' but that was from Slackbot. I never get it from any of my own integrations that are bot integrations.
— Reply to this email directly or view it on GitHub https://github.com/sillygwailo/Slack-Twitter/issues/15#issuecomment-123854746 .
Regards,
Bradley Weiers
Yup, they asked if it was using the as_user
flag, and I don't believe it is. When I hear more, I'll post it here.
It sounds like bot users have IDs that start with the letter B, so that's what I'll key on when messages come through. When I can steal a moment, that's how I'll implement it.
If you can give me a hint on where (i.e. which files) to get started perhaps I can spend some time on it.
I pushed the initial work I did, based on the information I got in the support request from Slack, to a branch called is_bot-check
. I haven't tested it much, and don't know if I got the ALLOW_INTEGRATIONS
flag check right. If you want to try that out, I'd be interested to know if that works the way you'd expected it to.
Ok, but on the current release Nuzzel can’t post through twitter, though it was doing so in the previous release.