aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
| * Support retrying requests when ratelimitedTrygve Aaberge2022-09-182-49/+89
| |
| * Gracefully handle user_is_restricted error on initial loadTrygve Aaberge2022-09-181-1/+10
| | | | | | | | | | | | If you are a guest on a team, requesting the user groups may fail with this error. Instead of failing the whole startup, report an error and continue.
| * Support including the d-s cookieTrygve Aaberge2022-09-183-5/+22
| | | | | | | | | | According to one comment it was necessary for them to include this cookie as well.
| * Improve output format for extract_token_from_browser.pyTrygve Aaberge2022-09-181-4/+8
| |
| * Don't list enterprise grid top level teamsTrygve Aaberge2022-09-181-1/+2
| | | | | | | | The individual teams in the enterprise grid is still listed.
| * Add a script to get session tokens and cookies from FirefoxTrygve Aaberge2022-09-182-0/+57
| |
| * Add documentation for using the new session tokensTrygve Aaberge2022-09-181-2/+6
| |
| * Support specifying both url encoded and raw (not url encoded) cookiesTrygve Aaberge2022-09-181-3/+15
| |
| * Don't open all DMs and MPDMs on startTrygve Aaberge2022-09-181-11/+32
| | | | | | | | | | | | | | | | Instead open only unread DMs and MPDMs. Unfortunately it doesn't seem to be possible to know which DMs or MPDMs are open from the last run or in the official client (without using internal APIs). We could explore alternatives like opening the ones with recent messages, or storing which are open, but this will have to do for now.
| * Handle conversations.info for all typesTrygve Aaberge2022-09-181-18/+11
| | | | | | | | | | | | This sets last_read on the channel, though we have no guarantee that we get the result from info before history, and if we get history first, the read messages will still be marked as unread.
| * Use SlackRequest options in file downloadTrygve Aaberge2022-09-181-1/+2
| |
| * Show which requests fail at startupTrygve Aaberge2022-09-181-6/+7
| |
| * Check if members is not empty in SlackMPDMChannelTrygve Aaberge2022-09-171-1/+1
| | | | | | | | | | | | If you use an xoxc token, the conversations.list endpoint returns an empty list for members of mpdms that have is_group set to true, which made this fail.
| * Support specifying an auth cookie in slack_api_tokenTrygve Aaberge2022-09-171-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | This is necessary for xoxc tokens. The cookie is specified after the token with a colon separating them, i.e. "token1,token2:cookiefor2,token3". This makes slack_api_token even more inconvenient, but it will have to do until we rewrite the config to have a section for each team, like the irc config has. Fixes #844
| * Support specifying cookies in SlackRequestTrygve Aaberge2022-09-172-10/+28
| | | | | | | | This is a necessary step for #844
| * Remove empty hook_process_hashtable callsTrygve Aaberge2022-09-171-3/+0
| | | | | | | | | | I don't think these are necessary. I've not experienced any errors after removing them.
| * Support starting wee-slack without using rtm.startTrygve Aaberge2022-09-172-23/+258
|/ | | | | | | | | | | rtm.start is deprecated and will stop working on September 20, 2022. This patch replaces it with several other API endpoints to get the info we need. The handle_rtmstart method is kept for the test setup to work, but this setup should also be replaced with the new API endpoints. This is a necessary step for #699 and #844
* Don't crash on missing mode on files in messagesTrygve Aaberge2022-09-171-1/+1
|
* Use correct parameter name for info requestTrygve Aaberge2022-09-171-1/+1
|
* Fix tests and formatting after last commitTrygve Aaberge2022-09-172-4/+4
|
* Check closed IM channels for unread messages (#859)Daniel Nelson2022-09-171-0/+17
| | | | | On connection check closed IM channels for unread messages and if any are found open a buffer. This ensures that new direct messages are not missed.
* Add /mute to command for setting the token in the readmeTrygve Aaberge2022-09-051-1/+4
| | | | Fixes #869
* Fix message changes not being processedTrygve Aaberge2022-01-311-1/+2
| | | | | | | | | | | | | The Slack API has changed message_changed events from having a unique ts to having the ts of the message that's changed, which means that the condition in the start of process_message to not process duplicate messages (see commit 68966be for info about that) made it skip the message_changed events. To fix this, only do this duplication check for messages without a subtype (i.e. new normal messages). This condition is becoming a bit convoluted, so it might be better to do this duplication check another way, but this will have to do for now to get the issue fixed.
* Fix formatting after black upgradeTrygve Aaberge2022-01-302-10/+5
|
* Update weemoji.jsonTrygve Aaberge2022-01-301-87/+2603
|