| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Previously, we would just surround the message with underlines. While
this renders equally in the official client, it's not actually a
me_message, which shows if you try to edit the message.
me_messages are not currently supported in threads. If you try to send
one in the official client you will get an error, so print an error in
wee-slack as well.
|
|
|
|
|
|
|
|
| |
This changes the color of the text of action messages to normal color so
that only the nick before the text is colored. This is the same as the
irc plugin does.
Fixes #355
|
|
|
|
| |
Fixes #463
|
|
|
|
|
|
| |
This fixes a bug where old messages would show up as new instead of as
backlog messages when channel history is reloaded (i.e. when running
/rehistory or after reconnects).
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a message arrived after history was requested, but before the
response arrived, it would be lost. It would be printed after the
"getting channel history" text, and then handle_history would clear
that, and it would not be printed again since the message ts already was
processed.
By clearing the messages dict, the message will get processed and
printed again. So we should never clear the buffer without also clearing
the messages, to prevent such problems.
|
|
|
|
|
|
|
|
| |
If the timestamp given to change_message doesn't exist in the messages
dict, just return.
Previously an unknown ts would make modify_buffer_line crash unless text
was set, because modify_buffer_line fails if text is None.
|
|
|
|
|
| |
This fixes an issue introduced in commit d7b26dd where (edited) would
not show up after changed messages.
|
|
|
|
|
| |
Make sure to mark the buffer as read right after we print a message from
our own user, so we don't see a flash of the unread bar.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The API has started to send both responses for sent messages as well as
message events for the same messages. Previously, we would only get
message events for messages from other clients. For the messages we send
ourselves we would just get responses, and no message events.
This caused wee-slack to print own messages twice, once for the response
and once for the message event. To prevent this, check if we already
have a message for the ts, and if we do, ignore the new message.
I don't want to rely on only the message events and ignore the
responses, because this change has rolled out gradually, so not all
users might get message events for own messages yet. Additionally, the
docs are not clear on what the behavior should be.
Fixes #606
|
|
|
|
|
|
|
|
|
|
| |
When refetching the history, we clear the buffer because the messages
will be printed again. Now the dicts for messages and hashed_messages
are also cleared, so they match what we actually have in the buffer.
This is necessary so we can check if a message is in the messages dict
to find out if it's printed to the buffer, which we need for the next
commit.
|
|
|
|
|
|
|
|
|
|
|
| |
The message suffix is only used to show that a message is edited.
Instead of keeping track of the suffix, just check if the message has
been edited in the render function, and add the text there. This way, we
only have to add the '(edited)' text one place.
With this change, the edited text moves to right after the message text,
before the attachments and files. It also fixes a bug where '(edited)'
would not show on messages that have a thread.
|
|
|
|
|
|
|
|
|
| |
Slack doesn't use the file_share subtype anymore, as file uploads are
now sent as normal messages with files attached.
The urls we render for files attached to messages are the same as the
urls this code previously inserted. The urls this code replaced out are
gone from Slack.
|
|
|
|
|
|
|
|
|
|
| |
Instead of changing the message text, append the files belonging to the
message when we render the message. This is the same as we do with
attachments. This fixes the issue where the files would not be shown
anymore if a message is changed.
The rendering format of the files is changed to match the way we render
refs.
|
|
|
|
|
|
|
| |
I don't think any if this is used anymore. The function changed
message_json, but that was not used after it was changed. It also added
attachments, but render is called later which also adds attachments, so
they ended up being included twice.
|
|
|
|
|
|
| |
* Adding support for new slack upload message style
* better handling of empty messages
|
|\
| |
| | |
Add support for shared channels
|
| |
| |
| |
| |
| |
| | |
The is_stranger attribute isn't clearly documented, so it's safer to
check if the team_id of the user matches the team_id of the team we
request the user in.
|
| |
| |
| |
| |
| | |
When messages were loaded before the user info were fetched for an
external user, this would crash.
|
| |
| |
| |
| |
| | |
We might want to use this request for other users as well in the future,
so we shouldn't assume that all of the users received by it are external.
|
| |
| |
| |
| |
| | |
The presence attribute is missing in the response for external users, so
we just set it to unknown.
|
| |
| |
| |
| |
| | |
This method may be called before an external user is fetched, so it
doesn't exist yet.
|
| |
| |
| |
| |
| | |
This is probably more reliable than depending on the topic not being
set.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since we have an is_external attribute on the users, it's simpler to
just have them all in a single list.
The documentation says that the user id is not necessarily unique across
teams, but I talked to Slack and they said it's unlikely to be a
collision. If you refer to a user in a message, you only use the id
without a team id, so you will have problems with collisions there
anyway. I'm waiting to hear from Slack how to handle that.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The current links in shared file messages only show a thumbnail and
require an extra click to get to the actual shared file, which is a
minor annoyance.
Links from external members in shared channels are also from their
team's Slack subdomain, so they're inaccessible if you're not a member
of their team. The direct links are from the files.slack.com subdomain
though and visible to all, and the official Slack client uses them to
show those files.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since shared channels only work with the new conversations API, a new
class of SlackChannel and API type were added to support them. Also
`rtm.start` doesn't include external users so their information needs to
be fetched individually when getting the channel history.
To distinguish external users from team members their nicks get appended
with an asterisk, which can be changed with a new setting. They also
appear in a new "External" group in the nicklist since their presences
can't be fetched with `users.getPresence`.
Unfortunately `conversations.history` doesn't include thread messages so
threads won't show up in shared channels.
|
| |
| |
| |
| |
| | |
Remember the last nick printed and re-add support prefix_same_nick.
Fixes: #357
|
| |
| |
| |
| |
| | |
These missing callbacks are not really errors or exceptions, and we
don't need to implement all of them. Raising an exception makes the
users think something isn't working, and is confusing.
|
| |
| |
| | |
Fixes: #573
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* print `image_url` if it exists
* add test for image_url
* requirements.txt for pytest
* fix requirements.txt
* text before image_url
* this isn’t required
* README readability for development section
thanks @trygveaa
* README reorder for this development section
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you have multiple windows in weechat, you get (by default) one typing
bar per window. Previously, the bar used the globally active channel
(the active channel in the active window) for all the bars, so all the
bars would show the same info. This changes it to use the active channel
for the window the bar is in.
The callback name is changed to include (extra), as that is necessary
for getting the active buffer for each window as an argument to the
callback function.
|
|
|
|
| |
Signed-off-by: Victor "multun" Collod <victor.collod@epita.fr>
|
| |
|
|
|
|
|
|
| |
some distributions do not distribute weechat with support for all
plugins by default, but use separate packages to provide support
for different scripting languages. users should be made aware of that
|
|
|
|
| |
token
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
in the registration dialog, wee_slack asks the user to reload the
slack script via /script. in my weechat 2.1 on debian sid, this is
not the proper way to reload scripts anymore. instead one has to
use the /python command to achieve the same effect. this commit
corrects the misleading instruction message.
|
|
|
|
| |
Fixes #531
|
|\
| |
| | |
Add emojis to status as a DM topic
|
| | |
|
| | |
|
| |
| |
| |
| | |
Finding by name didn't work anymore.
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
This now properly replaces spaces with underscores.
|