aboutsummaryrefslogtreecommitdiffstats
path: root/slack/slack_message.py
Commit message (Collapse)AuthorAgeFilesLines
* Correctly show reactions with more than 50 users in v3.0.0Trygve Aaberge2024-02-181-6/+7
| | | | | | | | | | | If a reaction has more than 50 users, the list of users will be cropped to just 50 users. This made the counts wrong since we used the number of users rather than the count property. Fix it by using the count property instead and adding "and others" to the list of users if show_reaction_nicks is enabled (the same as the Slack client shows when you hover over the reaction). This is the same fix as in commit 6b388cd9, but for version 3.0.0.
* Support files in Slack Connect channelsTrygve Aaberge2024-02-181-48/+62
| | | | | | | | | Files uploaded in Slack Connect channels doesn't contain any information, so we have to make a request to files.info in order to get the information to render it. See https://api.slack.com/apis/channels-between-orgs#check_file_info for more info.
* Fix bots with multiple names only being added once to nicklistTrygve Aaberge2024-02-181-21/+3
| | | | | If a bot uses multiple nicks, we have to add all of them to the nicklist, so none of the nicks are shown as offline.
* Refactor nick handlingTrygve Aaberge2024-02-181-21/+23
|
* Handle messages without a user fieldTrygve Aaberge2024-02-181-4/+21
| | | | | | This can happen in channels shared between workspaces if one of the workspaces are removed. Then messages from users in that workspace will not have a user field anymore, but instead a user_profile field.
* Unescape from_url in attachmentsTrygve Aaberge2024-02-181-1/+1
| | | | | | | | | | | | | | It looks like from_url should be unescaped, but title_link and image_url should not. Slack seems a bit inconsistent here though, as an image in an attachment will use the unescaped title_link, but the link in the title itself will use the original (possibly escaped) one. And the title for the image link will use the original (possibly escaped) title, while the title in the attachment will unescape it. I suppose you're not supposed to HTML escape (or Slacks version of it) URLs in title_link and image_url (which makes sense), but Slack does escape from_url if you send a message with a link to a thread message, so we have to handle that.
* Unescape file titlesTrygve Aaberge2024-02-181-4/+9
| | | | | Also mark a lot of fields as NotRequired as tombstone files doesn't have these fields.
* Support handling files that are not foundTrygve Aaberge2024-02-181-0/+5
|
* Use format_url everywhere a URL is printedTrygve Aaberge2024-02-181-18/+17
|
* Show thread broadcast prefix in thread buffersTrygve Aaberge2024-02-181-9/+10
|
* Make URL format configurableTrygve Aaberge2024-02-181-7/+6
|
* Fix URLs not being shown (only URL text was) in _unfurl_refsTrygve Aaberge2024-02-181-13/+18
|
* Support color rich text elementsTrygve Aaberge2024-02-181-0/+4
|
* Mark conversations info team as not requiredTrygve Aaberge2024-02-181-1/+1
| | | | | I have a huddle message in an IM on an enterprise workspace that doesn't have this field.
* Make conversations.name not asyncTrygve Aaberge2024-02-181-1/+1
| | | | | This means a lot of methods don't have to be async. It's especially useful for the next commit adding conversations completions.
* Support group broadcast refsTrygve Aaberge2024-02-181-2/+3
| | | | This is an alias for @channel.
* Show user status in DM buffer titleTrygve Aaberge2024-02-181-27/+3
|
* Handle when some items are missing from the responseTrygve Aaberge2024-02-181-5/+17
|
* Fetch all mentioned users at once in fill_historyTrygve Aaberge2024-02-181-3/+3
|
* Handle errors when looking up chat itemsTrygve Aaberge2024-02-181-15/+68
|
* Add tests for attachments and fix rendering bugsTrygve Aaberge2024-02-181-31/+63
|
* Apply code block styles firstTrygve Aaberge2024-02-181-5/+5
| | | | | | | It looks better to have the `` characters around the other styles when there's styling inside code blocks. It makes it look a bit worse when theres code blocks inside styled text though. It should really remember the order the styles are opened to close them in the correct order.
* Catch errors when rendering messageTrygve Aaberge2024-02-181-20/+27
|
* Support editing and deleting messagesTrygve Aaberge2024-02-181-0/+4
|
* Support sending messagesTrygve Aaberge2024-02-181-5/+1
|
* Apply highlights in chat even when notify is noneTrygve Aaberge2024-02-181-1/+4
| | | | | | | When notify is none, the buffer should not appear in the hotlist even for a highlight. However, when switching to the buffer, we want the line to be highlighted. To achieve this use a tag added to highlight_tags on the buffer.
* Support muted conversations configTrygve Aaberge2024-02-181-5/+24
|
* Add some repr methods for useful debug printingTrygve Aaberge2024-02-181-0/+6
|
* Remove color suffix from color optionTrygve Aaberge2024-02-181-4/+4
| | | | It's redundant to have this when the options are in the color section.
* Support highlight notifications without rendering historyTrygve Aaberge2024-02-181-328/+363
|
* Update message when subscribed/unsubscribedTrygve Aaberge2024-02-181-11/+19
| | | | | | Pyright doesn't allow me to set subscribed/last_read in _message_json since some of the _message_json types don't have them, so had to use separate attributes.
* Add unread buffers to hotlist on connectTrygve Aaberge2024-02-181-3/+6
|
* Use notify_private tag in private buffersTrygve Aaberge2024-02-181-6/+35
|
* Update message_json dict rather than replacing itTrygve Aaberge2024-02-181-1/+3
| | | | | In the message_replied event, the message json doesn't include all properties, so `subscribed` and others were removed when we replaced it.
* Mark buffer as read when conversation/thread is markedTrygve Aaberge2024-02-181-0/+11
|
* Correctly tag unread messages from historyTrygve Aaberge2024-02-181-1/+8
| | | | | | Now notify tags are set based on last_read so both read and unread messages gets the correct tags irregardless if they come from history or websocket.
* Get all reaction users in one requestTrygve Aaberge2024-02-181-1/+4
|
* Support overriding display_reaction_nicks per bufferTrygve Aaberge2024-02-181-1/+1
|
* Unfurl refs in text blocksTrygve Aaberge2024-02-181-8/+18
|
* If a message has a user, use that even though it's a bot_messageTrygve Aaberge2024-02-181-17/+9
| | | | | | | | | Messages from Slackbot apparently have both a user and a bot_id, and sometimes have the subtype bot_message, other times not. However, the bot_id is B01 which gives bot_not_found when trying to look it up. I see that the web client shows it with the user profile, and doesn't show the message as a bot message, so do that here as well to match it and avoid the invalid bot_id.
* Highlight messages with mentionsTrygve Aaberge2024-02-181-17/+81
|
* Add/remove nicks from nicklist when messages are printedTrygve Aaberge2024-02-181-6/+21
| | | | | | This ensures that all nicks that have typed in the channel and still is in it are in the nicklist, so they are not colored as offline. It also removes nicks from the nicklist when they leave a channel.
* Make sure thread prefix is rendered even though parent isn't fetchedTrygve Aaberge2024-02-181-5/+5
|
* Support thread hash completionTrygve Aaberge2024-02-181-5/+34
|
* Support thread buffersTrygve Aaberge2024-02-181-5/+16
|
* Fetch replies in conversation when display_thread_replies is onTrygve Aaberge2024-02-181-1/+3
|
* Unescape &, < and > in message text fieldTrygve Aaberge2024-02-181-1/+1
|
* Show number of reactions also when display_reaction_nicks is onTrygve Aaberge2024-02-181-2/+4
|
* Create a readonly messages property instead of get_messageTrygve Aaberge2024-02-181-1/+1
|
* Render tombstone messages as deleted messagesTrygve Aaberge2024-02-181-10/+11
|