| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes #697
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The weechat package on FreeBSD now uses python 3. I removed six, because
we don't use it directly, it's only a dependency of websocket-client
(and will be installed as that when you install the websocket-client
package).
|
|
|
|
|
| |
When including both a log tag and a no_log tag, the message may be
logged.
|
|
|
|
|
|
|
|
| |
There are scenarios where last_read isn't set, and only self messages
are printed. I experienced it when the only message in the channel was
me joining and renaming the channel. In that case, last_read were never
set, so we should set new_messages for our own messages so last_read
will be set.
|
|
|
|
|
|
| |
Commit 79c825d changed logging so only historic messages are prevented
from being logged, but join/leave/topic messages were not marked as
historic, so they were always logged.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This prevents a crash when you reload the script when using python 3 if
numpy is installed. When weechat unloads a script it calls Py_Finalize,
and when it loads a script, it calls Py_Initialize. If numpy is
imported, this causes python to segfault, which crashes weechat.
By setting numpy in sys.modules to None, it won't be imported when
websocket-client tries to import it. numpy is an optional dependency of
websocket-client, and if it's not installed, it will set numpy to None
itself, so therefore, this should work just like when numpy isn't
installed.
See https://github.com/numpy/numpy/issues/11925 for more details about
the issue in numpy.
|
|
|
|
|
|
| |
Simplify emoji_completion_cb by using hook_completion_get_string to get
the string that is being completed, instead of reading it out from the
contents of the input.
|
| |
|
| |
|
|
|
|
|
| |
This expands %h for us, so we don't have to do it ourselves. It also
expands ~ and eval expressions.
|
|
|
|
|
|
|
| |
The tab completion for the upload command tab completes paths relative
to weechat_dir, not the directory weechat was started from. Resolve the
path given to the upload command to that directory, so tab completed
relative paths work.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some terminals (at least Terminal.app and iTerm2) escape spaces in the
path when you drop a file in it. However, weechats tab completion does
not escape them, so we can't just remove the escape characters, in case
a user is trying to upload a file which has a name that contains "\ ".
Therefore, first check if the file exists, and then remove escapes if it
doesn't, and check if the unescaped name exists.
Fixes #360
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of creating a space separated string of the arguments for curl,
create a dict and use hook_process_hashtable. The benefit of this is
that we don't need to escape the spaces in the file name.
This also utilizes SlackRequest to create the url we post to, so we
don't have to hard code the url in this function.
I tried to use hook_process_hashtable to request the url directly,
instead of calling the curl command, but I didn't manage to make it
upload the file in a format accepted by Slack. I opened an issue to
weechat about it: https://github.com/weechat/weechat/issues/1352
|
|
|
|
|
|
| |
The default values are created when the function is created, so when
it's mutated, the default value is mutated. Create a new dict each time
the function is called instead.
|
|
|
|
|
|
| |
Fallback to the id when the user isn't known, like we do for
SlackDMChannels. As a next step, we should look up the missing users and
update the name, like we do for SlackDMChannels.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Preventing logging of all backlog messages meant that messages you sent
from other clients wouldn't be logged, even if wee-slack was running.
Additionally, there's an existing bug which sometimes causes the
messages you send in wee-slack to be marked as backlog messages, so
those wouldn't be logged either.
Instead, only prevent logging of messages from the history request,
since we always want to log new messages arriving over the websocket.
It's still only backlog messages which are not logged, so messages which
arrive when wee-slack isn't running will be logged (as long as you don't
read them in another client before starting wee-slack).
|
|
|
|
|
| |
Haven't run into issues regarding this, but using the attribute instead
of the name is probably less likely to break in the future.
|
|
|
|
| |
This is the same as what the irc plugin does.
|
|
|
|
|
| |
irc_channels should only complete channels, not dms. A separate
completion, irc_privates, completes dms.
|
| |
|
|
|
|
| |
Fixes #580
|
| |
|
| |
|
|
|
|
| |
Fixes #235
|
|
|
|
| |
Previously, it was only printed if the status text was set.
|
|
|
|
|
|
|
| |
Now prints the status if no arguments are given. To unset the status,
pass the argument -delete.
Fixes #574
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Previously, own nick would always be set to the username.
Fixes #692
|
| |
|
| |
|
|
|
|
|
|
| |
The only messages left that gets nick_unknown is messages in the team
buffer and the "getting channel history" message. There's no point in
setting nick_unknown for these.
|
| |
|
|
|
|
|
| |
We shouldn't set irc_privmsg and the others for all messages, just
for normal messages in channels.
|
|
|
|
| |
Fixes #663
|
| |
|
|
|
|
|
| |
Replace irc_smart_filter with irc_join and irc_part. There is no
smartness implemented, so irc_smart_tag shouldn't be set.
|
|
|
|
|
| |
The "getting channel history" message doesn't need any of the logic in
buffer_prnt, so by printing it directly, we can drop this argument.
|
|
|
|
|
| |
By sending in backlog as a separate argument to tag instead of as a
tagset, we can mark all types of messages as backlog messages.
|
| |
|
| |
|
|
|
|
|
|
| |
Mostly removes None as a second argument to .get(...), since that is the
default value. Also replaces get with brackets a few places where get is
not necessary.
|
| |
|
| |
|
| |
|