| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
After thread buffers are closed, the instances still remains in
channel.thread_channels, but channel_buffer is set to None.
reprint_messages may be called after this, e.g. on a reconnect.
Therefore, we have to check if channel_buffer is set before calling
buffer_clear.
|
| |
|
| |
|
|
|
|
|
|
|
| |
A channel and a thread channel in that channel has the same message
instances, but different hashed_messages dictionaries. Therefore,
message.hash may be set, without it being present in hashed_messages.
Insert it into hashed_messages in hash_message if that is the case.
|
|
|
|
|
|
|
| |
If you have a stored layout so one of the wee-slack buffers gets
switched to when it's created, the history for that channel wouldn't be
loaded until you switched buffers if background_load_all_history was
off.
|
| |
|
| |
|
|
|
|
|
| |
I don't think we ever receive thread messages out of order, so this
probably isn't strictly necessary, but it is a bit safer just in case.
|
|
|
|
|
|
|
| |
I don't think we would ever get the same thread message twice (unless we
call /rehistory -remote, but that processes the parent message again
too, so submessages is created again), but it is more robust to only
append ts's which are not in the list already.
|
| |
|
|
|
|
|
| |
So we don't have references to the thread message instances both in
messages and submessages.
|
|
|
|
|
|
|
| |
Only store parent_channel and thread_ts, and use that to lookup the
parent message. This is so parent_message doesn't refer to an old
instance of the message if the message has been created again by using
/rehistory -remote.
|
| |
|
|
|
|
|
| |
If new messages arrive over the websocket while we get the history, we
don't want to delete those when the history request finishes.
|
|
|
|
| |
background_load_all_history is off
|
|
|
|
|
|
| |
background_load_all_history is set
Fixes #629, fixes #715, closes #732
|
| |
|
|
|
|
|
| |
This is useful to only get new messages after we reconnect to the
websocket, instead of loading the whole history again.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Without any arguments, /rehistory will now just clear the buffer and
print the history again. With -remote, the history will be downloaded
from Slack and processed again.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #775
|
| |
|
| |
|
|
|
|
| |
This isn't necessary anymore.
|
|
|
|
|
| |
This fixes typing indicators for mpdms, which was previously not
working.
|
|
|
|
|
|
| |
users.info takes the id, not the name of the user. This worked in
practice before this change because it was only called for unknown
users, and unknown users gets the name set to the id.
|
|
|
|
|
|
|
| |
A few places used slack_name when displaying the name to the user. name
should be used instead because tincludes the correct prefix. The first
place was just for dms though which doesn't have a prefix, so that won't
show any difference.
|
|
|
|
|
|
|
|
| |
We shouldn't change the full name for typing indicators because autosort
will reorder the buffer, and it may break scripts using the full name.
We didn't show typing indicator until the previous commit anyways,
because the full name was never updated until that.
|
| |
|
|
|
|
|
| |
formatted_name checks if colors should be enabled, so it's not necessary
to send it in as a parameter as well.
|
|
|
|
|
| |
There was some mechanism for this, but it wasn't used. Replaced the old
unused mechanism with a new one.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
I mainly did this because I'm going to call formatted_name with
style=default before team is set, and that didn't work as it was because
the other styles used the team.
For SlackDMChannel I moved colorizing into the branch for the sidebar
style because colors should never be included in the other styles.
formatted_name is never called with enable_color=True and another style
than sidebar, so the behavior doesn't change.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Slack only sends typing notices every 5-6 seconds, so when we expired
them after 4, a user which continously typed a message would disappear
from the typing bar every 4 seconds and appear again after a second. Now
they are shown continously, and for about the same duration as the web
client.
|
|
|
|
|
| |
SlackChannel.members is overwritten in set_members and user_joined, so
it could become stale when it was an attribute.
|
|
|
|
|
| |
Lots of places used members instead of get_members, and it's
inconvenient having to call a function anyways.
|
|
|
|
| |
We don't receive any event when a user has stopped typing.
|
|
|
|
|
|
|
|
|
| |
Slack doesn't render the `text` property at all when `blocks` is
non-empty, so we shouldn't render both `text` and `blocks`. However,
because we don't support the `rich_text` block type yet, we have to fall
back to the `text` property when `rich_text` is present. Therefore,
render both `text` and `blocks` if `rich_text` is present, else render
only `blocks` if it is non-empty, and only `text` if `blocks` is empty.
|
|
|
|
|
| |
I don't think this exists anymore, and we support rendering markdown so
we shouldn't use fallback anyways.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, files with a mode other than "tombstone" were assumed to have a
"title" and "private_url". This is not necessarily the case; in particular,
files with the "hidden_by_limit" (removed from visibility because the
workspace has exceeded its free-tier storage limit) mode have *only* "id" and
"mode". This resulted in a KeyError trying to look up the "title" and
"private_url", and truncated history at the message with that file.
This commit explicitly handles "hidden_by_limit" files, and makes the handling
of any other unknown modes more robust by explicitly checking for "title" and
"private_url" before rendering a message with them.
|
| |
|