simion / sublime-slack-integration

A ST3 plugin which sends messages, code selections and files to slack.com channels/groups/users.
http://simionbaws.ro/sublime-text-3-slack-integration-plugin/
GNU General Public License v2.0
70 stars 7 forks source link

Small Fixes and Features #2

Closed davejhilton closed 9 years ago

davejhilton commented 9 years ago

Hey, thanks for this plugin!

I added a few features in a forked branch, mostly to suit my own (and my team's) liking. But then I thought I'd at least submit the changes to you as a pull request in case you think they're worthwhile enough to add to the main package.

disclaimer: my python is a bit rusty—it's been a while...

The biggest change I made was making it so that when the receiver of the message is a specific user (via @someUser), it now sends that message as a direct private message using the IM API. Before it would just dump the message into that user's default/slackbot channel, which made it hard to follow up with a conversation about a posted snippet.

I also added 2 new optional settings. I've updated the README.md on my forked branch to include explanations of these 2 new settings:

So that's probably the easiest way to see what they do.

Note that although the "username_subtext" setting I added would override the existing "show_platform_and_name" setting, I tried to "do the right thing" by maintaining backwards compatibility... by making that new setting be null by default so it's an "opt-in" feature, and by still respecting the original "show_user_and_platform" setting if it's set to true. That way, anyone upgrading shouldn't suddenly have it change behavior on them.

Anyway—feel free to reject the merge, and/or change anything I've done before merging. Like I said these changes were mostly to suit my own liking... but I thought it would be great to see them in your package-manager hosted version

Thanks!

simion commented 9 years ago

Very good man, Thanks.

I haven't updated this plugin because I work in another company where we don't use slack (yet). However, if we will start using slack, for sure I'll update this plugin, and make one for PyCharm too.

Any contributions are welcome!

simion commented 9 years ago

I made a release with your improvements, and it's on live. Should be updated for all users now. Thanks

davejhilton commented 9 years ago

Hey thanks! I really appreciate you taking the time to do that!