| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Instead of finding each match and calling replace on the text with that
match, use re.sub to replace all the matches.
|
|
|
|
|
|
|
|
| |
@group isn't mentioned in the documentation[0], and is changed to
@channel if you try to complete it in the web client, so it probably
shouldn't be used anymore.
[0]: https://get.slack.help/hc/en-us/articles/202009646-Notify-a-channel-or-workspace
|
|
|
|
|
|
|
|
|
| |
This is for the notifications @channel, @everyone, @group and @here.
@group isn't mentioned in the documentation[0], but it is still rendered
as a highlight in the web client, so I included it.
[0]: https://get.slack.help/hc/en-us/articles/202009646-Notify-a-channel-or-workspace
|
| |
|
|
|
|
| |
Fixes #587
|
|
|
|
| |
Subteams/usergroups should never be used without the @.
|
| |
|
| |
|
| |
|
|
|
|
| |
This includes the prefix that shows the channel type.
|
| |
|
|
|
|
| |
Fixes #703
|
|
|
|
| |
Fixes #100
|
|
|
|
|
|
|
| |
The username can't be changed by the users themselves now and is auto
generated for new users, so we shouldn't use it. Only use username as a
last resort if neither display name nor full name is set (I'm not sure
this ever happens, it looks like the full name field is mandatory).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Attachment fields are not guaranteed to have a title at all.
This fixes in particular slackbot app approval messages, with an
attachment like so:
{
"callback_id": "whitelist_A11BCGM0E_181389840855",
"fields": [
{
"short": true,
"value": ":white_check_mark: *<@U4RPXA42F|davo> approved this app for the team.*"
}
],
"fallback": "Approve or deny the application",
"id": 4,
"color": "#2ab27b"
}
|
| |
|
|
|
| |
Also hide any unset fields.
|
|
|
|
|
| |
This prevents printing an error when running /away without -all on
buffers other than slack buffers.
|
| |
|
| |
|
|
|
|
| |
Fixes #697
|
|
|
|
|
| |
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
|
| |
|