| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Relates to #797
|
| |
|
| |
|
|
|
|
|
|
|
| |
Since people install this either just by copying the script, or by
installing it from WeeChats repo, and neither of these methods install
dependencies automatically, I really want to keep dependencies to a
minimum. So I don't think it's useful to document how to add new ones.
|
|
|
|
|
|
| |
How to install the dependencies for development and running tests is now
documented in docs/contributing.md, so change the development section to
just a debugging section.
|
|
|
|
|
| |
Doesn't matter much, but this skips a redirect, and is the url I get
when starting a new Pipenv.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[Pipenv][0] makes it easier to maintain a consistent development
environment for projects using Python. You no longer need to manage
`pip` and `virtualenv` separately, nor deal with the drift and other
issues requirements.txt brings. It enables gaining insights into your
dependency graph, but most importantly - it enables deterministic
builds, which prevents the entire class of "it works on my machine"
problems.
[Pipenv][0] is similar to package managers from other ecosystems, such
as Node.js' `npm` or Rust's `cargo`. Additionally, [Pipenv][0] is an
[officially recommended package manager][1] by the Python project.
This patch brings [Pipenv][0] to the wee-slack project to simplify the
development and contribution experience. Additionally, this patch brings
basic contributing documentation to help onboarding.
[0]: https://github.com/pypa/pipenv
[1]: https://packaging.python.org/tutorials/managing-dependencies/#managing-dependencies
|
|
|
|
|
|
| |
lnotify.py and all of the other local notification scripts for linux in
the repo have issues (see https://github.com/weechat/scripts/issues/433),
so recommend the trigger in the wiki instead, which seems to work great.
|
|
|
|
| |
Relates to #793
|
|
|
|
|
|
|
|
|
| |
I have experienced this being called with a user id we're not aware of,
in which case metadata["user"] will be None. I think shared
teams/channels are the reason for this.
We should look up the user id when it's unknown, but for now just ignore
typing notices for unknown users so we don't get an exception.
|
|
|
|
|
| |
The argument names didn't match the names used in the template string.
This bug was introduced in commit 63382c5.
|
| |
|
|
|
|
| |
This was broken in commit d427501.
|
|
|
|
| |
This was broken in commit d427501.
|
|
|
|
|
|
|
| |
Previously threads in pms had localvar type set to channel. Now the type
is set to the same as the parent channel.
Fixes #789
|
| |
|
| |
|
|
|
|
|
| |
When not using english locale, date could contains non ASCII characters.
Fixes #419
|
|
|
|
|
|
|
|
| |
Bot messages in threads have subtype set to bot_message (just like bot
messages in channels), so we can't use subtype to check if a message is
a thread message or a channel message.
Fixes #749
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If buflist.format.indent includes "slack_type", assume that it handles
the indent for slack threads specifically, so we should not add any
indent in the short_name. Otherwise, add a space at the start of
short_name so it is indented in the buflist.
This means that you can use e.g. this value for buflist.format.indent to
get a nice tree view in the buflist, with threads nested under the
channels:
/set buflist.format.indent "${color:237}${if:${buffer.local_variables.slack_type}==thread?${if:${buffer.next_buffer.local_variables.slack_type}==thread?│ ├─:│ └─}:${if:${buffer.next_buffer.local_variables.type}=~^(channel|private)$?├─:└─}}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This caused some issues, so I think it's best to revert it:
- If you don't set a color in the indent option, and otherwise use
default format options, the normal indent will be colored green while
the thread indent will be colored white.
- It will look worse for people with tree-style indent unless they
specifically change the indent option for Slack.
- The indent will be included when the name is shown in the hotlist,
and other places that show short_name.
Even without this, it's still possible to get nice indenting of threads
if you add the condition `${buffer.local_variables.slack_type}==thread`
in the indent option and use that to print extra indent for threads. You
will get an extra space before the name (the default indent), but I'll
add a commit to remove that if the indent option includes slack_type.
This reverts commit f55bf93ad9dd9a90afa987ee45ac7c862d85084b.
|
|
|
|
|
|
|
|
| |
Add command /slack create to create a channel. Currently doesn't switch
to the channel after it's created, even when switch_buffer_on_join is
true, that is a todo for later.
Fixes #415
|
|
|
|
|
|
| |
The localvar type has to be set to server, channel or private for things
to work properly. Add slack_type so you can differentiate between
channels, groups/private channels, threads, ims and mpims.
|
|
|
|
|
| |
This allows you add a condition for slack threads in the indent option
to display the correct thing, e.g. when using tree style indent.
|
|
|
|
|
| |
The indent string may set a color and not reset it, because it's not
necessary to reset it for normal channels.
|
|
|
|
| |
Fixes #783
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This caused a problem for relay clients. They are not notified when
print hooks are disabled/enabled, so they have to use the tags and line
properties to determine if a line should notify.
One could argue that they should not notify when notify_none is present,
even if it's a highlight, but this is not how the hotlist or default
beep trigger in weechat behaves. When a message with a highlight is
printed, that is added to the hotlist and beeps even if notify_none is
set (wee-slack removes the buffer from the hotlist immediately after
printing the line, which is why that wasn't a problem in plain weechat).
Additionally, this caused messages you had reacted to to be highlighted
when the buffer was reprinted, since the text now included your name
when the line was printed.
This reverts commit de5eb518fda26fed3b5cd41c20b064c04020bbb9.
|
|
|
| |
Fixes #781
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were setting the notify level for unmuted buffers to 3. This is not
the right thing to do because weechat has a
weechat.look.buffer_notify_default option which might be set to a
different value. By removing the option instead, weechat will use the
default value.
Additionally, when we change the notify level for a buffer, this is
stored in the config (for weechat >= 2.6). Having such a config for all
buffers is annoying, but with this change the config will only be
present for muted buffers.
This fix is not perfect because you still get config values for muted
buffers, and since wee-slack is overriding the notify level you can't
override it yourself for specific buffers. A potential solution to this
could be to set notify level for each line instead of setting notify
level for the buffer.
Fixes #746
|
|
|
|
|
|
| |
Mpdms should behave the same way as dms when it comes to notifications
etc., so I think it makes more sense to set type to private than to
channel.
|
|
|
|
|
|
|
|
|
|
|
| |
When you set a short name, the prefix wee-slack sets (# for channels,
+ for dms with present users etc.) is normally dropped so the short name
is exactly how the user wants it. However that makes it impossible to
see presence in the buflist when short name is set (unless you set it
with /label which keeps the prefix). Therefore, if the short name is set
to a name starting with a space, replace the space with + if the user is
present. This gives the same prefix behavior and characters as when
short name is not set.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
When short name is set with /buffer set short_name, instead of changing
it to include the prefix, keep it as is. I think this is what would be
expected, and it also allows the user to choose which prefix to show.
When showing typing notices, replace the first character with the typing
character.
|
| |
|
|
|
|
|
| |
This caused a bug where the short_name got a double prefix, because the
label was set to the short_name which wasn't changed.
|
| |
|
|
|
|
|
|
|
|
|
| |
Thanks to @Informatic for the initial implementation of this in PR #426.
I have seen that most attachment colors are without the leading #, but a
few does include it, so we have to handle it.
Fixes #424, closes #426
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
WeeChat doesn't support inserting new lines apart from at the bottom, so
normally when a message is changed to contain more lines, it is not
shown properly until the buffer is redrawn. However, if the message
that's being changed is the last one, we can insert new lines so it's
shown properly.
|
|
|
|
|
| |
Now that we don't run print hooks for backlog messages, we can keep
highlights without triggering anything else.
|
| |
|
|
|
|
|
|
|
| |
The + prefix is used for presence in dm channels, so it's easier to
distinguish threads by using a different character. $ is used for
message ids, which is how the threads are named by default, so I thought
that was natural.
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #563
|