aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix incorrect placement of f for an f-stringTrygve Aaberge2023-06-291-2/+2
|
* Remove examples from top of extract_token_from_browser.pyTrygve Aaberge2023-06-291-4/+0
| | | | | | The script prints usage if you run it with --help, so I don't see a need for these examples. The examples are likely to get outdated when the script options are changed, so I rather not have them there.
* Run black to format extract_token_from_browser.pyTrygve Aaberge2023-06-291-46/+52
|
* Firefox-snap and chrome/chrome-beta support (#884)Bogdan Dobrelya2023-06-291-30/+180
| | | | | | | | | | | | | | | | | | | * Add support for cookies decryption for Chrome/beta * Add support for firefox-snap, and multiple default/custom profiles paths * If no token can be found, like no key localConfig_v2 in webappsstore2, try the best to fetch it from leveldb (or online copy of it, if locked by running browser). When no luck even with that, suggest the user to fetch it manually from dev console, and pass it as an extra argument. This way it still saves some extra cycles for the script users by fetching d/d-s values, and formatting the ultimate registration command string. Not tested on Darwin, leaving this as an exercise for you Adding Chromium support should be straightforward and can be done in follow-ups. Signed-off-by: Bohdan Dobrelia <bdobreli@redhat.com> Co-authored-by: Bogdan Dobrelya <bogdando@mail.ru>
* Support /msg * in thread buffersTrygve Aaberge2023-06-231-7/+9
| | | | Fixes #888
* Add info to get contents of a messageTrygve Aaberge2023-06-231-0/+19
| | | | Fixes #889
* Remove Debian instructions for Python 2Trygve Aaberge2023-06-231-1/+1
| | | | | WeeChat in Debian switched to Python 3 in bullseye (currently oldstable), so the Python 2 instructions shouldn't be necessary anymore.
* Remove macOS specific note for pipTrygve Aaberge2023-06-231-3/+0
| | | | | | If I understand https://docs.brew.sh/Homebrew-and-Python correctly, Homebrew Python installs python3 so you can use pip as described for "Other".
* Use `python3 -m pip` instead of `pip3` in readmeTrygve Aaberge2023-06-231-1/+1
| | | | | Pip recommends using `python3 -m pip` instead of just `pip` (and Python recommends using `python3` rather than just `python`).
* Note that slack_api_token is evaluated in descriptionTrygve Aaberge2023-06-232-2/+3
|
* Add a note that /slack register stores the token in plain textTrygve Aaberge2023-06-231-0/+8
|
* Automatically enable emoji/usergroups completionTrygve Aaberge2023-06-232-20/+16
| | | | | | Automatically set completion_default_template on wee-slack buffers, so emojis and usergroups can be tab completed without having to set weechat.completion.default_template manually.
* Remove running on Python 2.7 in CITrygve Aaberge2023-06-231-2/+2
| | | | The setup-python action doesn't support Python 2.7 anymore.
* Return from modify_buffer_line if the line isn't foundTrygve Aaberge2023-06-231-0/+3
| | | | | | | | | If the line isn't found, line_pointer becomes an empty string which will crash WeeChat when it's used with hdata_update. This happened when the history for a channel that contained a reply also posted to the channel was loaded, because in that case wee-slack tries to modify the parent message before the channel history is printed, so it couldn't find the line.
* Use prefix_nick_<color> tag for messages in WeeChat 4.0.0Trygve Aaberge2023-06-031-1/+23
| | | | | | | | | | Since WeeChat now has multiline support, the problems with using prefix_nick_<color> (mainly that it isn't possible to distinguish between a multiline message and multiple messages when weechat.look.prefix_same_nick is set) isn't present anymore, so we can use this tag to properly mark lines as chat messages from a nick. This also means that we don't have to use prefix_same_nick or nick_prefix/suffix ourselves anymore.
* Only modify a single chat line for one message in WeeChat 4.0.0Trygve Aaberge2023-06-031-0/+5
| | | | | | | | | Since WeeChat now has multiline support, the whole message is in one chat line. This means that we don't need to look for all the lines belonging to a message and modify them, we can just modify the line for the message directly. This has the benefit of making it possible to increase and decrease the number of lines for a message, rather than having to join extra lines or get blank lines.
* Support multiline rendering in WeeChat 4.0.0Trygve Aaberge2023-06-031-4/+5
| | | | | | Don't insert a prefix at the start of each line of a message so it renders normally in WeeChat 4.0.0 which supports chat lines with multiple lines.
* Include a space between nicks in reaction stringTrygve Aaberge2023-05-301-1/+1
| | | | | | | | | Without spaces, WeeChat will consider all the nicks as one word, which means that rather than wrapping between nicks, it will fill the whole line and wrap in the middle of nicks. Additionally, if you have disabled weechat.look.align_multiline_words it will start from the beginning of the line when wrapping, rather than after the prefix, which doesn't look nice.
* Fix some text formattingTrygve Aaberge2023-03-071-2/+2
| | | | | Remove a space before a colon and add a comma after a sentence starting with if.
* Format with new black versionTrygve Aaberge2023-03-071-7/+1
|
* feat(huddle): Display link to join huddle when started (#885)Romain THERRAT2023-03-071-0/+30
|
* Add docs for installing from the WeeChat repoTrygve Aaberge2023-01-121-24/+39
|
* Capitalize WeeChat correctly in the docsTrygve Aaberge2023-01-125-37/+37
|
* Add missing space in auto_open_threads option descriptionTrygve Aaberge2023-01-123-4/+4
|
* Update Python script instructions in README.md (#879)H Countryman2023-01-121-6/+14
|
* Release v2.9.1v2.9.1Trygve Aaberge2022-10-302-1/+18
|
* Show useful link for Slack postsTrygve Aaberge2022-10-302-10/+15
| | | | | | | | | | | | | The url_private link for Slack posts just downloads a json of the post, which isn't very useful to click on. The permalink goes to the web view for a post, which is what we want. The web client adds origin_team and origin_channel, which makes the post page show info about where the post is shared, so add that here as well. We still want to use url_private for images etc., not permalink there as well, because that links to the Slack client with the image shown in the sidebar, which is much more inconvenient than just getting the image directly.
* Fix link previews from apps not being recognizedTrygve Aaberge2022-10-291-1/+3
| | | | | | | | If a link preview was added by an app, like GitHub, instead of directly by Slack, it was not detected by wee-slack as a link preview, so it would be shown even if link_previews was set to false. Fixes #834
* Update weemoji.json fileTrygve Aaberge2022-10-291-0/+2047
|
* Support receiving multiple header blocks in http responsesTrygve Aaberge2022-10-152-5/+54
| | | | | | | | | | | One user experiences receiving a "HTTP/1.1 200 Connection established" header block before a "HTTP/2 200" header block with the headers. I'm not sure why specifically this happens, but I know a similar response will happen if redirects are followed. This wasn't supported by the http_check_ratelimited function which splits the header from the body. It now splits out all the header blocks from the body and uses the status and headers from the last one.
* Evaluate value of weechat.look.buffer_time_formatTrygve Aaberge2022-10-091-2/+5
| | | | Fixes #871
* Remove compatibility for irc_nick_color_nameTrygve Aaberge2022-10-081-2/+1
| | | | | This is only required for WeeChat < 1.5, and we require >= 2.2, so there's no point in keeping this.
* Update WeeChat version check to require >= 2.2Trygve Aaberge2022-10-081-2/+2
| | | | | | | After moving the token in Slack API requests from a query string param to an Authorization header in commit 2185a58 we require WeeChat >= 2.2 because that was the version which added support for setting HTTP headers.
* Add tests for url_encode_if_not_encodedTrygve Aaberge2022-10-051-0/+17
|
* Open open IMs and MPIMs on startTrygve Aaberge2022-10-041-0/+2
| | | | | | | | | | | | | We used the response from rtm.start to find which IMs and MPIMs to open, but after moving away from that we didn't have the information from the response from conversations.list, so commit 962bbc5 changed to only open unread ones. However, it turns out that conversations.info has the information, and we are already requesting that for each IM/MPIM to check if it's unread, so we can use that to open the correct ones. Fixes #875
* Fix old type MPIMs not being marked as unread on startTrygve Aaberge2022-10-041-1/+1
| | | | | | | | Old type MPIMs (has `is_group: true`) has `is_open`, but not `unread_count_display` in the response from `conversations.list`, so they were not marked as unread on start if background_load_all_history was set to false because we have to request the history, but `check_should_open` created the buffer, so it wasn't requested here.
* Fall back to bot_id as nick if no other info is availableTrygve Aaberge2022-10-021-1/+1
| | | | | | | | | | Apparently there are some bots which are not listed in users.list and which sends messages where the only info about the sender is a bot_id. To fix this properly we will have to look up the bot with bots.info when we encounter an unknown bot_id, but for now just fall back to using the id directly like we do with unknown users to make it possible to use triggers and filters.
* Update script author to myselfTrygve Aaberge2022-10-021-2/+2
| | | | | I've been the maintainer of this script for several years now, and Ryan isn't involved anymore, so it makes sense to update the script author.
* Update usage of deprecated WeeChat API methodsTrygve Aaberge2022-10-021-16/+24
| | | | | The script will use the new methods if the WeeChat version is new enough, and the old deprecated methods if it's too old for the new ones.
* Update Options.mdTrygve Aaberge2022-09-201-0/+6
|
* Release v2.9.0v2.9.0Trygve Aaberge2022-09-192-2/+24
|
* Fix compatibility with Python 2Trygve Aaberge2022-09-191-9/+7
|
* Reformat code after last commitTrygve Aaberge2022-09-191-1/+1
|
* feat(display): Add URL when slack block contain URL (#863)Romain THERRAT2022-09-191-0/+2
| | | | | | When slack return a button message type and a url field is present we should output the URL. Fix: #811 and #810
* Merge pull request #857 from wee-slack/xoxc-tokensTrygve Aaberge2022-09-185-120/+573
|\ | | | | | | Support new session tokens (xoxc tokens) and replace the usage of rtm.start (which will soon stop working) with other API methods.
| * Add a note that the cookie is invalidated on log in/outTrygve Aaberge2022-09-181-0/+3
| |
| * Fix limit parameter in history requestTrygve Aaberge2022-09-181-1/+1
| | | | | | | | | | Limit should be used now, so it seems like count has been renamed to limit.
| * Check if channel is mpim before shared on loadTrygve Aaberge2022-09-181-2/+2
| | | | | | | | | | | | On one of my teams, all the MPIMs have is_shared set to true and the name is not set correctly if they are created as SlackSharedChannel instead of SlackMPDMChannel.
| * Load list of MPIMs separately on startTrygve Aaberge2022-09-181-14/+26
| | | | | | | | | | On one of my Slack teams, none of the MPIMs are included in conversations.list if types include public_channel for some reason.
| * Fix /query not working for new MPIMsTrygve Aaberge2022-09-181-18/+34
| |