| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Trying to concat exceptions containing non-ascii chars with our own
message failed with a UnicodeDecodeError. We have to decode them to
unicode strings first. This includes some helper methods for that, one
which includes the traceback, and one which only has the error.
Fixes #593
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Remove handling of all exceptions. If an unknown exception happens, it's
better to just let it print a stack trace to the core buffer so we
notice it, instead of just printing it in the debug buffer.
The two specific exceptions we handle are just necessary for the recv
call, so we can move the rest of the lines outside of the exception
handling.
|
| |
|
|
|
|
|
|
| |
If sending to the websocket fails, it is most likely down and we'll have
to reconnect. By disconnecting, the reconnect timer will ensure we
reconnect.
|
|
|
|
|
|
|
| |
If you're connecting to multiple teams, especially if one of them is
large, the call to rtm.start may time out. By retrying it, there's a
greater chance that it works (especially since when it tries again, the
requests to rtm.start for the other teams have probably finished).
|
| |
|
| |
|
|
|
|
| |
* for details please see: https://api.slack.com/methods/chat.getPermalink
|
|
|
|
| |
Closes #562
|
|
|
|
| |
Useful when running wee-slack without a open session in a browser/app.
|
|
|
|
|
|
|
| |
There's no reason to not use the server aliases even when
short_buffer_names is on. Now, it will use server aliases for the
servers that has it defined, and short names for the rest if
short_buffer_names is on.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we close a buffer, weechat invokes a callback so we can unregister
the channel. However, when we close the buffer ourselves in the
unregister function it caused the unregister function to be called
again. By deleting the buffer from our list first, the second invokation
of unregister won't find the channel, so the rest isn't run again.
This prevents an error from weechat when we sent None into buffer_clear
because the channel_buffer had already been set to None.
Also does some cleanup. Use global EVENTROUTER, check if channel exists
instead of catching exception and remove some unnecessary checks.
|
| |
|
| |
|
|
|
|
| |
Fixes #597
|
| |
|
|
|
|
|
| |
Instead of duplicating much of the documentation for commands and
options, refer to the /set and /help commands in weechat.
|
| |
|
|
|
|
|
| |
This includes these commands in the help command. It also allows these
commands to be used with the /slack prefix.
|
|
|
|
|
| |
Don't send in the command name as part of args. This removes the need
for removing the name from args.
|
|
|
|
|
|
|
|
|
| |
We should use hook_command instead of hook_command_run when we add new
custom commands because this will include completion and help for the
command.
When we use this, the command name won't be included in the arguments,
which is why the usage of args in the functions has changed.
|
| |
|
|
|
|
|
|
| |
linkarchive now supports being run without arguments, and if so it will
output a link to either the team or the channel, depending on where it's
run. openweb has been removed.
|
|
|
|
|
|
| |
When the command starts with command_, it will be listed in the help and
callable with /slack. This is just a callback function, so it should not
be callable directly by the user.
|
|
|
|
|
| |
This is a command meant for debugging and shouldn't be normally
available and listed in the help.
|
|
|
|
|
| |
/leave is by default aliased to /part. We don't have to specify this in
wee-slack.
|
|
|
|
| |
Fixes #363
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When a user is mentioned in a topic, it's only resolved in the
15:47:34 <--> @someone set the channel topic: blah blah @mention blah
message. The buffer title, however, reads:
blah blah <@JHDJFHKDW> blah
|
|
|
|
|
|
|
|
|
|
| |
When a "channel_joined" event is received (e.g. when joining channels
from the web client, or when someone else makes you join the channel),
update_from_message_json sets self.topic to the dict, but render_topic
expects it to be a string. This is an inconsistency introduced by
e64293b41573b5caad2ebf343d9a4397cef22a67. Let's keep the dict.
Actually, using update_from_message_json at all seems like a bad idea...
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This won't stop formatting within backticks, but will avoid applying
bold formatting to a message like this:
* Run this find command: `find . -name '*.exe'`
Ref: #566
|
|
|
|
|
|
|
| |
This allows copy-pasting messages preserving their formatting,
and will help avoid characters going missing within backticks.
Ref: #566
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit adds a `show_presence_presence` config option that defaults to
true. When true, the `+` appears before present users in the buffer
list, as they did before this commit. But when false, the `+` mark is
omitted and presence is no longer shown.
This helps users who want their terminal programs to flag activity but
don't consider presence changes to be activity worth flagging.
|
|
|
|
|
| |
This is for users with a team that has restricted which apps that can be
installed in Slack.
|
| |
|
| |
|
|
|
|
|
| |
This option allows a user to set a custom color to the (edited)
suffix on messages that have been edited.
The default color is set to '095', as it was the former choice.
|
|
|
|
| |
* fixes #618
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If `short_buffer_names` is set, the buffer names doesn't contain slack,
so the bindings that was set didn't work. In order to make the bindings
work for these users by default, bind to all python buffers instead,
because we are not able to differantiate these buffers from other python
buffers.
wee-slack won't overwrite existing bindings so this won't break anyones
setup. Users with these bindings already set will just have to set the
bindings themselves. None of the registered weechat script uses these
bindings, so this is most likely much fewer users than those that have
`short_buffer_names` set.
|
|
|
|
| |
Fixes a bug introduced two commits ago, in commit fd4ddd9.
|
|
|
|
| |
Fixes #533
|
|
|
|
| |
Prints user friendly error messages if given invalid arguments.
|