| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This caused a bug where the short_name got a double prefix, because the
label was set to the short_name which wasn't changed.
|
| |
|
|
|
|
|
|
|
|
|
| |
Thanks to @Informatic for the initial implementation of this in PR #426.
I have seen that most attachment colors are without the leading #, but a
few does include it, so we have to handle it.
Fixes #424, closes #426
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
WeeChat doesn't support inserting new lines apart from at the bottom, so
normally when a message is changed to contain more lines, it is not
shown properly until the buffer is redrawn. However, if the message
that's being changed is the last one, we can insert new lines so it's
shown properly.
|
|
|
|
|
| |
Now that we don't run print hooks for backlog messages, we can keep
highlights without triggering anything else.
|
| |
|
|
|
|
|
|
|
| |
The + prefix is used for presence in dm channels, so it's easier to
distinguish threads by using a different character. $ is used for
message ids, which is how the threads are named by default, so I thought
that was natural.
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #563
|
| |
|
| |
|
|
|
|
| |
Relates to #563
|
|
|
|
|
| |
Label is only for the short_name, so we should always rename the full
name.
|
| |
|
| |
|
|
|
|
| |
The tests were broken in commit 855cf3c.
|
|
|
|
| |
This was broken in commit cd888c2.
|
|
|
|
|
|
|
|
|
| |
If wee-slack looses connection to the server while a history request is
in the queue and reconnects before the history response is received, it
will set history_needs_update to True and call get_history, but since a
history request is pending, a new one won't be triggered so
history_needs_update will remain True. Setting history_needs_update to
False when receiving the history fixes this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The websocket url is only valid for 30 seconds. If wee-slack didn't
manage to connect in time, it would set history_needs_update and
reconnect, but not load history again which meant that each channel
would load history when you switched to the buffer.
I also think there was a slight chance of a message being sent in the
time between history loading and connecting to the websocket, which I
think would mean it would be lost. By fetching history after connecting
to the websocket, this can't happen.
Lastly, by not fetching history before connecting to the websocket, I
think there is less chance of not connecting to the websocket url before
it expires.
|
|
|
|
| |
Fixes #629, fixes #756
|
|
|
|
|
| |
There shouldn't be any exceptions here. If there are, we shouldn't catch
them, so we can notice and fix them.
|
|
|
|
|
|
|
| |
Since we look up the message ts from the tags as of the last commit, we
should place the ts tag first so we don't have to loop through the other
tags when finding it. This should make it a bit faster to find a
message, especially when we have to search through many lines.
|
|
|
|
| |
Fixes #514
|
|
|
|
| |
Fixes #709
|
| |
|
|
|
|
| |
This was fixed in commit ad1a715.
|
|\
| |
| | |
Automatically reload history after reconnect
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are two situations where notify_thread is called multiple times
where we only want to notify once. One is when we load history for a
thread which has multiple unread messages, the other is when you become
subscribed to a thread because you are mentioned in it.
For the first case, we want to set last_notify to now, so we don't
notify for the rest of the unread messages following the first. For the
second, the message ts may be greater than now (same second, but greater
minor part), so we want to set last_notify to the message ts. Therefore
we set last_notify to max of these two.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When using conversations.history (which doesn't include replies), we
want to fetch the replies for a thread even if
thread_messages_in_channel is off if the user is subscribed to the
thread and it has unread messages, so we can notify for new replies.
Technically, we could notify without fetching the history, but it's
easier to just fetch the history so the normal notification check is
run, and when the thread has unread messages, the user probably wants to
read them, so it's nice that they don't have to wait for history when
opening the thread.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When you subscribe to a thread, I think it's safe to assume that you
have read the messages or want to treat the messages as read, and this
is what the web client does.
I'm not sure what the point of sending last_read for unsubscribe is, but
the web client does so, and it was easiest to do it for both.
|
| |
| |
| |
| |
| | |
Slack doesn't support marking unsubscribed thread as read (it responds
`message_not_found`).
|
| |
| |
| |
| | |
Fixes #376
|
| |
| |
| |
| |
| | |
When destroy_buffer is called, the buffer will be closed, so there isn't
any point in clearing it.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
This creates a common method for getting a message from a message hash
or count. Since all commands now use the same method, all commands that
accepts a hash now also accepts a count.
|
| | |
|
| |
| |
| |
| | |
Fixes #619, fixes #754
|
| |
| |
| |
| |
| |
| |
| | |
When fetching replies for older threads, the messages in the thread
older than the first message we fetched from history would be displayed
in the buffer. We don't want these to be displayed, because there may be
other messages in between which we haven't fetched.
|
| |
| |
| |
| |
| | |
This is necessary for thread messages rendered in the channel, either
broadcast messages or when thread_messages_in_channel is on.
|
| | |
|
| |
| |
| |
| |
| |
| | |
We don't allow the ts to be used in commands, so it doesn't make sense
to fall back to it. After the latest commits, hash is always available,
so just use that.
|
| | |
|
| |
| |
| |
| |
| | |
This is so we can show the hash for a thread message when the parent
message isn't fetched.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When you receive a new thread message on one of your messages that's not
already a thread you may get the subscribed event after the message
event. Previously, that meant you would not get a notification, because
notify_thread ran in process_message, before you were subscribed. Run
notify_thread in process_thread_subscribed too to ensure we notify for
these messages.
|
| | |
|