aboutsummaryrefslogtreecommitdiffstats
path: root/slack/slack_buffer.py
Commit message (Collapse)AuthorAgeFilesLines
* Replace use of history_pending with is_loadingTrygve Aaberge2024-03-291-1/+0
| | | | | | | | | history_pending had a problem with being stuck as True if a crash occurred. Additionally, only is_loading is shown in the input bar item, so if only history_pending is True for some reason (which shouldn't happen), it's not shown. I don't think I need a separate variable, so instead of fixing history_pending, just use is_loading which doesn't have these problems.
* Look for message hash before index in ts_from_hash_or_indexTrygve Aaberge2024-02-271-1/+4
| | | | | | | Otherwise a hash that's all digits can't be used without the $ prefix. Message hashes are always at least three characters, so even though this prevents using indexes that collides with a hash, I don't think it's a problem as such large indexes doesn't seem practical anyways.
* Replace a str.format with an f-stringTrygve Aaberge2024-02-201-1/+1
|
* Add support for focus events (mouse/cursor mode)Trygve Aaberge2024-02-201-13/+17
|
* Make api accessible from SlackBufferTrygve Aaberge2024-02-201-5/+5
|
* Don't print the same message multiple timesTrygve Aaberge2024-02-181-5/+16
| | | | | | | | | | When joining a channel you seem to get the last messages for it over the WebSocket. When joining a channel you've parted and you still have the buffer for open, those messages will already be in the buffer, so we have to make sure their not printed multiple times. I've also been told that messages can appear multiple times in the reconnect brach, which this should fix too.
* Add an option to leave the channel when a buffer is closedTrygve Aaberge2024-02-181-1/+5
|
* Don't call conversations.leave when closed from serverTrygve Aaberge2024-02-181-2/+15
|
* Don't run buffer close callback when script is unloadingTrygve Aaberge2024-02-181-0/+2
| | | | | We don't want to call the API to close im/mpim conversations when the script is unloading.
* Improve performance of rerender_history for WeeChat >= 4.0.0Trygve Aaberge2024-02-181-7/+32
| | | | | | | | | | | | | Previously each message was rerendered individually. This meant that for each message, we start at the bottom of the buffer and go through all the lines upwards until we find the message. So the lines were looped through a lot of times which was slow. Now we instead go through all the lines once, look up the message for each line and updates it. This is only for >= 4.0.0 since earlier versions may have multiple lines for each message (when the message has multiple lines). That would complicate this way of updating the messages, and I don't think it's worth implementing it when it's only for an old version.
* Set buffer_pointer to None when buffer doesn't existTrygve Aaberge2024-02-181-3/+9
| | | | | | This enforces us to check that buffer_pointer is set, so we don't accidentally operate on the core buffer, which is what is done when buffer_pointer is an empty string.
* Fix bots with multiple names only being added once to nicklistTrygve Aaberge2024-02-181-2/+2
| | | | | 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-1/+1
|
* Check that buffer_pointer is set before printing/modifying messagesTrygve Aaberge2024-02-181-0/+6
|
* Fix bugs with /slack reply commandTrygve Aaberge2024-02-181-5/+11
|
* Format all files with ruffTrygve Aaberge2024-02-181-1/+2
|
* Add completion of emoji namesTrygve Aaberge2024-02-181-4/+1
|
* Make conversations.name not asyncTrygve Aaberge2024-02-181-4/+4
| | | | | This means a lot of methods don't have to be async. It's especially useful for the next commit adding conversations completions.
* Support completing @nicks in current bufferTrygve Aaberge2024-02-181-1/+17
| | | | | | | | | | | Adds all known nicks in the current buffer with an @ prefix to the nicks completion. Disables the API search based nick completion for now until it's working properly. It currently doesn't have any context of which conversation/thread you are in, so you often get other nicks than the one you want to complete first. Additionally, it doesn't work with OAuth tokens.
* Support bold/italic attributes when sending messagesTrygve Aaberge2024-02-181-1/+5
|
* Support mentioning usersTrygve Aaberge2024-02-181-3/+24
| | | | | | | This currently has the limitation that the user has to be known to wee-slack for the mention to work. That is, there needs to be some interaction with it (message or reaction from or mention) or it has to be in the loaded members in any of the loaded conversations.
* Support open/close/joined/left conversation eventsTrygve Aaberge2024-02-181-0/+1
|
* Support editing and deleting messagesTrygve Aaberge2024-02-181-20/+84
|
* Support adding and removing reactionsTrygve Aaberge2024-02-181-3/+59
|
* Support sending messagesTrygve Aaberge2024-02-181-2/+18
|
* Apply highlights in chat even when notify is noneTrygve Aaberge2024-02-181-0/+6
| | | | | | | 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.
* Reload conversations on reconnectTrygve Aaberge2024-02-181-5/+15
|
* Add unread buffers to hotlist on connectTrygve Aaberge2024-02-181-2/+2
|
* Mark as read when switching away from bufferTrygve Aaberge2024-02-181-0/+23
|
* Mark buffer as read when conversation/thread is markedTrygve Aaberge2024-02-181-0/+6
|
* Set unread marker after last read messageTrygve Aaberge2024-02-181-0/+2
|
* Correctly tag unread messages from historyTrygve Aaberge2024-02-181-2/+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.
* Highlight messages with mentionsTrygve Aaberge2024-02-181-1/+1
|
* Support typing notices for thread buffersTrygve Aaberge2024-02-181-12/+0
|
* Support thread buffersTrygve Aaberge2024-02-181-0/+275