sillygwailo / Slack-Twitter

Read your timeline, fave tweets, and post to Twitter from Slack.
48 stars 4 forks source link

Unable to Auto-Tweet Slack Messages Posted by Bots #15

Open buck-0x opened 9 years ago

buck-0x commented 9 years ago

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')) {

sillygwailo commented 9 years ago

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.

buck-0x commented 9 years ago

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 notifications@github.com 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.

sillygwailo commented 9 years ago

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.

buck-0x commented 9 years ago

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 notifications@github.com 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

sillygwailo commented 9 years ago

Yeah, existing integration is what I meant. I'll see what I can figure out.

buck-0x commented 9 years ago

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 notifications@github.com 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

buck-0x commented 9 years ago

Any word from the Slack guys?

sillygwailo commented 9 years ago

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.

buck-0x commented 8 years ago

Any response from them?

On Wed, Jul 22, 2015 at 4:37 PM, Richard Eriksson notifications@github.com 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

sillygwailo commented 8 years ago

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.

sillygwailo commented 8 years ago

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.

buck-0x commented 8 years ago

If you can give me a hint on where (i.e. which files) to get started perhaps I can spend some time on it.

sillygwailo commented 8 years ago

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.

jaredbidlow commented 6 years ago

Ok, but on the current release Nuzzel can’t post through twitter, though it was doing so in the previous release.