| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
It turns out that some channels in rtm.start include a member list with
a few users, but not all. Therefore, I don't know how we can know if the
list is complete or not, so we have to call conversations.members for
all channels.
Fixes #829
|
|
|
|
|
|
|
|
|
|
| |
I'm not sure when members for a channel is included in rtm.start, but
it seems like shared and private channels doesn't include the field at
all, while some other channels have started to only include the user.
Therefore, call conversations.members if a channel doesn't have any
members or if the only member is the user.
Hopefully this fixes #829
|
|
|
|
|
|
| |
Thanks to @sudoforge in #828 for this.
Closes #828
|
| |
|
|
|
|
|
|
| |
Fixes a bug where the first line would use prefix_same_nick after
reprinting messages if the first and last message were from the same
person.
|
|
|
|
|
|
|
|
| |
conversations.members only returns 100 members if we don't specify
limit, and requires pagination to get the rest. We want to know more
members than that, so specify a limit of 1000, which is the max we can
specify. If a channel has more than 1000 members, we would have to use
papagination to get all, but I'll just do this simple change for now.
|
|
|
|
|
|
|
| |
Since all members might not be known yet in get_history (which is why we
call conversations.members), if we look up unknown users there, we won't
look up all the unknown users. Check for unknown users when receiving
the response for conversations.members instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I don't like displaying the user identifier, but if all of the steps in
get_sender fails, it's better to fallback to the identifier rather than
an empty string, so you can at least distinguish between different
users.
It falls back to an empty string again if user_identifier is None,
because some messages in the tests doesn't even have a user_identifier.
Though, I don't think any messages the Slack servers are sending now are
missing user_identifier.
After the last commit, hopefully this fallback to user identifier will
never be used though.
|
|
|
|
|
|
| |
If a message is sent from an external user, the message will include the
user profile, so we can use that to display the correct name if we
haven't fetched the user info yet.
|
| |
|
| |
|
|
|
|
|
|
|
| |
This patch removes the configuration for Travis-CI, and adds
configuration for Github Actions.
Co-authored-by: Ashish Kulkarni <ashish@kulkarni.dev>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Apparently chat.meMessage requires these characters unescaped, even
though it interpret links using these characters. There doesn't seem to
be any options for changing this behavior, so we have to linkify
nicks/channels while also leaving <>& unescaped.
Fixes #704, closes #822
|
| |
|
|
|
|
|
| |
This was broken in #774 as it checked if there was at least one
reply, which is not the case for new threads.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that conversations.mark works for all tokens, just using the
conversations API the same way as the old APIs works fine as far as I
can see.
Loosing unread_count_display by replacing mpim.open with
conversations.open and channels.info with conversations.info means that
mpims and channels will not be marked as unread when wee-slack loads if
background_load_all_history has been set to false anymore. As far as I
can see, the only way to check if they have unread messages is by
loading the history, so there is no way around this.
Fixes #792
|
|
|
|
|
|
|
|
|
| |
hashlib returns a byte string in Python 2, but since we only use unicode
strings elsewhere the check against that in
SlackChannelHashedMessages.__missing__ didn't work. Make sure sha1_hex
returns a unicode string instead.
Fixes #800, closes #801
|
| |
|
|
|
|
| |
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.
|