aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release v2.8.0v2.8.0Trygve Aaberge2021-05-112-1/+20
|
* Add compatibility with WeeChat >= 3.2 (XDG directories)Sébastien Helleu2021-05-111-3/+8
|
* Support MPIMs in channel list of rtm.startTrygve Aaberge2021-05-113-15/+41
| | | | | | | | | | | For some reason, some MPIMs are listed in the channel list of the response from rtm.start, with is_mpim set to true, instead of in the mpims list. These incorrectly appeared as private channels instead of MPIMs in wee-slack. These entries do not contain a members list, so we have to call conversations.members and set the name after receiving the response from that.
* Add indicator for broadcast thread messages (#838)Bill Doyle2021-05-111-1/+13
|
* Support mpim_aware RTM APITrygve Aaberge2021-05-082-89/+102
| | | | | | | | | | | | Apparently, the API now sends an mpim_joined event when an MPIM is created instead of a group_joined event, even if we don't set mpim_aware to true. Instead of just handling mpim_joined in addition to group_joined (which could cause issues if both are called for MPIMs, though I haven't experienced that), it's better to properly support mpim_aware. Fixes #825, fixes #833
* Include channel name in file names for downloaded filesTrygve Aaberge2021-04-301-4/+6
| | | | Fixes #836
* Ignore failing flake rules instead of selecting only a fewTrygve Aaberge2021-04-134-5/+13
| | | | E203 should be ignored when using black according to their docs.
* Fix some flake8 errorsTrygve Aaberge2021-04-133-5/+4
|
* Some code cleanup from lgtm.com checksTrygve Aaberge2021-04-122-18/+19
|
* Update docker alpine image to use python3 package (#831)Shawn Toffel2021-04-011-1/+1
|
* Fix test broken in the previous commitTrygve Aaberge2021-03-211-1/+1
|
* Call conversations.members for all channelsTrygve Aaberge2021-03-211-1/+4
| | | | | | | | | 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
* Call conversations.members for all channel typesTrygve Aaberge2021-03-211-22/+9
| | | | | | | | | | 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
* Run black check in CITrygve Aaberge2021-03-202-0/+5
| | | | | | Thanks to @sudoforge in #828 for this. Closes #828
* Format all python files with blackTrygve Aaberge2021-03-2022-1868/+3154
|
* Clear last_line_from when clearing bufferTrygve Aaberge2021-03-061-0/+1
| | | | | | 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.
* Increase the number of channel members we fetchTrygve Aaberge2021-03-061-1/+1
| | | | | | | | 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.
* Get user info for unknown users after getting channel membersTrygve Aaberge2021-03-061-4/+4
| | | | | | | 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.
* Fallback to user identifier if we can't find a name in get_senderTrygve Aaberge2021-03-061-1/+1
| | | | | | | | | | | | | | | 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.
* Get message sender nick from profile for unknown usersTrygve Aaberge2021-03-061-0/+7
| | | | | | 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.
* feat(ci): add python 3.9 to the test matrixBenjamin Denhartog2021-03-061-2/+2
|
* feat(ci): add python 3.8 to the test matrixBenjamin Denhartog2021-03-061-2/+2
|
* feat(ci): use github actions instead of travis-ciBenjamin Denhartog2021-03-062-23/+103
| | | | | | | This patch removes the configuration for Travis-CI, and adds configuration for Github Actions. Co-authored-by: Ashish Kulkarni <ashish@kulkarni.dev>
* Release v2.7.0v2.7.0Trygve Aaberge2021-02-242-1/+51
|
* Update Options.md after last commitsTrygve Aaberge2021-02-241-0/+6
|
* Add tests for link_previous option added in previous commitTrygve Aaberge2021-02-221-0/+31
|
* Add support to disable teammate link previews (#815)Joan Touzet2021-02-221-0/+5
|
* Don't escape <>& in me messagesTrygve Aaberge2021-02-211-14/+16
| | | | | | | | | 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
* lookup message via hash with fallback to countAshish Kulkarni2021-02-202-3/+6
|
* allow new threads to be opened via /thread <THREADID>Ashish Kulkarni2021-02-201-2/+1
| | | | | This was broken in #774 as it checked if there was at least one reply, which is not the case for new threads.
* Replace deprecated APIs with conversations APITrygve Aaberge2021-02-202-20/+22
| | | | | | | | | | | | | | | 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
* Fix thread id collision detection not working in Python 2Trygve Aaberge2020-10-091-1/+1
| | | | | | | | | 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
* Combine duplicated send_message codeTrygve Aaberge2020-10-051-19/+14
|
* Print error message when sending message failsTrygve Aaberge2020-10-052-4/+7
| | | | Relates to #797
* Remove unnecessary team parameter in SlackMessage initTrygve Aaberge2020-10-051-7/+7
|
* Don't display the typing indicator for muted conversations (#794)Latchezar Tzvetkoff2020-10-041-1/+1
|
* Remove section about adding dependencies from contributing docsTrygve Aaberge2020-10-041-28/+0
| | | | | | | 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.
* Remove outdated info about virtualenv and improve debugging docsTrygve Aaberge2020-10-041-7/+13
| | | | | | 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.
* Use direct pypi url to skip redirectTrygve Aaberge2020-10-041-2/+2
| | | | | Doesn't matter much, but this skips a redirect, and is the url I get when starting a new Pipenv.
* feat: use pipenv to manage the development environment (#784)Ben Denhartog2020-10-046-5/+109
| | | | | | | | | | | | | | | | | | | | [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
* Improve documentation for notify methodsTrygve Aaberge2020-09-161-7/+18
| | | | | | 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.
* Use slack_timeout for websocket connectionTrygve Aaberge2020-09-091-2/+3
| | | | Relates to #793
* Check that user is not None in typing noticesTrygve Aaberge2020-09-081-1/+1
| | | | | | | | | 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.
* Fix argument names in format functionTrygve Aaberge2020-08-291-1/+1
| | | | | The argument names didn't match the names used in the template string. This bug was introduced in commit 63382c5.
* Fix session token description to work in FirefoxTrygve Aaberge2020-08-271-3/+4
|
* Fix thread broadcasts sent from wee-slack not becoming broadcastsTrygve Aaberge2020-08-241-1/+2
| | | | This was broken in commit d427501.
* Fix thread broadcasts not appearing in channelsTrygve Aaberge2020-08-241-2/+5
| | | | This was broken in commit d427501.
* Set correct localvar type for threads in pmsTrygve Aaberge2020-08-201-5/+9
| | | | | | | Previously threads in pms had localvar type set to channel. Now the type is set to the same as the parent channel. Fixes #789
* Support global weemoji.json fileTrygve Aaberge2020-08-181-2/+7
|
* Use native multiline input support for weechat >= 2.9Trygve Aaberge2020-08-181-5/+10
|