aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
Commit message (Collapse)AuthorAgeFilesLines
* Stop polling dead websockets. Fixes #349Cameron Matheson2017-07-051-1/+2
|
* Merge pull request #351 from wee-slack/settings_cleanupRyan Huber2017-04-211-10/+0
|\ | | | | Clean up a little bit
| * Remove colorize_messages settingTollef Fog Heen2017-04-161-1/+0
| | | | | | | | This doesn't seem to be used, so just remove it.
| * Remove dead code related to cacheTollef Fog Heen2017-04-161-9/+0
| | | | | | | | The cache is gone, remove some related code.
* | Fix channel history not appearing when an earlier message has 'text': NoneBen Kelly2017-04-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Today I learned that sometimes, rather than the key missing, it has the value None. In this case, (key in dict) is true! This fixes an issue where, if the backscroll of a channel contained such a message, it would throw while fetching the backscroll and cut off without fetching all of it. Signed-off-by: Ben Kelly <btk@google.com> Signed-off-by: Ben Kelly <bk@ancilla.ca>
* | Merge pull request #347 from V13Axel/status_commandRyan Huber2017-04-181-0/+25
|\ \ | | | | | | Add command for setting Slack Status
| * | Remove redundant team reference retrievalV13Axel2017-04-171-1/+0
| | |
| * | Add command for setting Slack StatusV13Axel2017-04-131-0/+26
| | |
* | | Decode arguments sent to callback functionsTrygve Aaberge2017-04-151-0/+36
| | |
* | | Do encode/decode in websocket and urllib callsTrygve Aaberge2017-04-151-3/+3
| | |
* | | Create a wrapper around weechat which handles encodingTrygve Aaberge2017-04-151-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | This encodes everything sent into weechat, and decodes the return values, so we don't have to do it every place we call weechat. We still have to decode the arguments in all of the callback functions though. The encode_to_utf8 and decode_from_utf8 functions traverses data structures and encodes/decodes all of the strings inside the structures.
* | | Remove all calls to encode and decodeTrygve Aaberge2017-04-151-20/+9
| | | | | | | | | | | | | | | We will readd these in the appropriate places, as described two commits ago.
* | | Remove utf8 argument from get_senderTrygve Aaberge2017-04-151-5/+2
| | | | | | | | | | | | This was not used anywhere.
* | | Use unicode literals everywhereTrygve Aaberge2017-04-151-30/+32
| |/ |/| | | | | | | | | | | | | | | | | | | | | This changes all strings to be unicode strings in an attempt to handle unicode better. The idea is to use unicode everywhere internally in wee_slack and decode/encode where data is received/sent to/from wee-slack. That means we have to decode strings received from weechat or slack and encode strings we send to them. This way encoding and decoding is done on specific places, and if done everywhere, we should not get any unicode errors.
* | PEP8 fixupsTollef Fog Heen2017-04-131-168/+374
|/ | | | Lots of missing whitespace and other minor fixups.
* do it for channels but not users, hence new elifRyan Huber2017-04-131-1/+3
|
* yay for unfurlsRyan Huber2017-04-131-13/+13
|
* wrong var nameRyan Huber2017-04-131-1/+1
|
* Merge pull request #339 from ToxicFrog/toxicfrog/nick-coloursRyan Huber2017-04-131-11/+7
|\ | | | | Defer nick colourization to weechat's built in support
| * Defer nick colourization to weechat's built in supportBen Kelly2017-04-131-11/+7
| | | | | | | | Signed-off-by: Ben Kelly <btk@google.com>
* | Merge pull request #338 from ToxicFrog/toxicfrog/formattingRyan Huber2017-04-131-1/+5
|\ \ | | | | | | Translate slack formatting codes to/from IRC formatting codes
| * | Translate slack formatting codes to/from IRC formatting codesBen Kelly2017-04-131-1/+5
| |/ | | | | | | Signed-off-by: Ben Kelly <btk@google.com>
* / Handling incoming me_message subtypes.Ben Kelly2017-04-131-7/+15
|/ | | | Signed-off-by: Ben Kelly <btk@google.com>
* massssssssive merge of the new codebaseRyan Huber2017-04-121-2095/+2568
|
* Make this fail back to the default for testability0.99.11Ryan Huber2017-01-261-1/+4
|
* messages received during reconnect are missed w/o thisRyan Huber2017-01-261-0/+3
|
* Merge commit 'refs/pull/285/head' of github.com:rawdigits/wee-slackRyan Huber2017-01-261-0/+33
|\
| * Add support for /awayTollef Fog Heen2016-12-191-0/+33
| | | | | | | | | | | | | | | | | | | | Set localvar which is picked up by weechat and which should be picked up by `screen_away.py` and similar tools. Thanks to Tor Hveem (@torhve) for inspiration. Fixes: #161 This should also make /away D
* | add str function for debuggingRyan Huber2017-01-261-0/+3
| |
* | fix some settings that weren't migratedRyan Huber2017-01-261-6/+6
| |
* | Merge commit 'refs/pull/290/head' of github.com:rawdigits/wee-slackRyan Huber2017-01-261-79/+82
|\ \
| * | Refactor the way settings workBen Kelly2016-12-231-79/+82
| |/ | | | | | | | | | | | | | | | | | | | | | | | | All the per-setting globals are replaced with a single global object, 'config'; its attrs are the weechat settings. They're automatically updated on config change, and the setting names and defaults are specified as part of a map in the PluginConfig class definition. To add a new setting, add the setting name and default to PluginConfig.settings, and if it's not a boolean, add an appropriate PluginConfig.get_<name> method as well. Signed-off-by: Ben Kelly <bk@ancilla.ca>
* | Merge pull request #296 from lchausmann/masterRyan Huber2017-01-261-0/+2
|\ \ | | | | | | Handles upload with spaces in filename
| * | Handles upload with spaces in filenameLars Chr. Duus Hausmann2017-01-091-0/+2
| | |
* | | restore away/active indicator but still don't update nicklistRyan Huber2017-01-251-11/+12
| | |
* | | derpRyan Huber2017-01-241-4/+4
| | |
* | | fix the other methods tooRyan Huber2017-01-241-8/+11
| | |
* | | fix to not open ever damn user as a channelRyan Huber2017-01-241-1/+2
| | |
* | | finally get rid of some of my idiocyRyan Huber2017-01-241-35/+41
| | |
* | | don't care about last message anymore. load all historyRyan Huber2017-01-241-4/+1
| | |
* | | don't load channel history until opening the channelRyan Huber2017-01-241-2/+9
| | |
* | | don't update nicklists with presence anymoreRyan Huber2017-01-241-8/+4
| | |
* | | typing: don't trigger typing indicator from weechat commandsMatt Robenolt2017-01-191-1/+2
|/ /
* / Format connection-info as unicodeThom Wiggers2017-01-041-6/+6
|/
* Make message editing use actual regexesTollef Fog Heen2016-11-281-10/+22
| | | | | | | | | | | | If you use s/foo/bar/, use actual regexes for this, since that's what some of us expect. Also add support for /g to do it globally. Don't add any way to have the old functionality, if too many people complain we can have that behind another syntax or a flag. Based heavily on the code by @terminalmage Fixes #219, #197
* Make it possible to set timeouts on slack URL commsTollef Fog Heen2016-11-281-4/+7
| | | | | | | | | | | | | On very busy slack networks the default timeout of 20000 can be a problem. This timeout can mean that the extension is unable to download all the necesarry data before weechat times out the connection. This patch allows for the timeout to be adjusted so that for larger networks the end user can specify it. Based on #279 by @GregBowyer. Closes: #279
* every time we open a buffer, we clear the hashtableRyan Huber2016-11-221-1/+7
|
* Merge pull request #215 from terminalmage/issue190Ryan Huber2016-11-181-1/+0
|\ | | | | Remove unnecessary channels.join API request
| * Remove unnecessary channels.join API requestErik Johnson2016-04-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two problems with this API request: 1. According to https://api.slack.com/methods/channels.join, "user" is not a valid argument. 2. The hash table lookup in the removed line of code is destined to fail anyway, because ``self.name`` here refers to the channel name, which is not present in the ``users`` SearchList() instance as it maps usernames to the Slack API user IDs. Indeed, this causes the call to ``users.find(self.name)`` to return ``None``, causing an AttributeError to be raised. Fixes #190.
* | Merge pull request #263 from rawdigits/tfheen/performanceTollef Fog Heen2016-11-111-14/+27
|\ \ | | | | | | Performance improvements