| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Instead of each of the callers of unfurl_refs having to get the config
values, get them in unfurl_refs if they are not set by the caller.
|
|
|
|
|
|
| |
This changes the feature from the previous commit so it's also possible
to only display the url when the text and the url (without the protocol)
in a link is equal.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When you write multiple words separated by dots, or email adresses,
Slack will turn those into links. Wee-slack will display this as
`text (url)`, where url is just the text with http:// or mailto:
prefixed. This makes the text hard to read, and might not even make
sense (e.g. when writing server names or user@hostname).
When you receive such an url, the alt text of the url will be the
original text. This means that we can check if the url is just the alt
text with a protocol prefixed. If it is, we should just print the alt
text and ignore the url.
I guess some people may want the urls, so they are able to click the
links. And since it removes information coming from slack, I made it
into an option instead of making it the default.
|
|\
| |
| | |
When expanding attachments avoid rendering same link multiple times
|
| | |
|
|\ \
| | |
| | | |
Update list of emoji completions
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This was done using the following command. It is not an API call and
pretty fragile to changes, so we can't use it to automatically load the
list from wee_slack.py.
curl -s 'https://cfr.slack-edge.com/bv1-1/emoji.84b5140d201ea94c81b4.min.js' | \
sed -e 's/.*emoji.prototype.data = \({[^}]*}\).*/\1/' \
-e 's/\\n/\n/g' -e 's/\\t/\t/g' -e 's/\\'/'/g' | \
jq '{emoji: [to_entries | .[].value[3]] | flatten | sort}'
|
| | |
| | |
| | |
| | | |
This makes it easier to see what is changed when we update the list.
|
|\ \ \
| | | |
| | | | |
Print error message when initial connection fails
|
| | | |
| | | |
| | | |
| | | |
| | | | |
No point in keeping commented out code, especially since this code has
never been active.
|
| | | |
| | | |
| | | |
| | | | |
This makes the error case a bit clearer and easier to read.
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
I chose to print this instead of using dbg since it's a rather critical
error message.
Fixes #432
|
|\ \ \
| | | |
| | | | |
Fix broken tests
|
| | | |
| | | |
| | | |
| | | | |
As far as I can see, this isn't used anywhere.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The commit 6718e2f added some more events to the queue when a buffer is
created. This made some tests fail as it would process these events
instead of the ones added in the tests. Fix it by processing all events
in the queue when setting up the eventrouter for the tests.
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Setting up the eventrouter for the tests involves code that requires
the config object to be set, so it has to depend on mock_weechat.
This didn't cause a problem when all the tests were run since the first
test depends on mock_weechat so it would be set up. However, if you
tried to run a single test that depended on realish_eventrouter, but not
mock_weechat, it would fail.
|
|\ \ \
| |/ /
|/| | |
Fix overzealous regex in unfurl_refs
|
| | |
| | |
| | |
| | |
| | |
| | | |
This tests the bug that was fixed in commit c667bf6, where a message
that first has an url and then a > character would try to unfurl
everything up to the last >.
|
| | | |
|
| | |
| | |
| | |
| | | |
Signed-off-by: Ben Kelly <btk@google.com>
|
|\ \ \
| | | |
| | | | |
Improve rendering of changes in multiline messages
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If you update a line with hdata_update and pass a string containing
newlines, the buffer will become a bit broken when bare display mode is
activated (alt+l). It seems that the newlines are printed in bare mode,
but extra lines are not inserted, so the lines are overlapping with each
other.
Fixes #306
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Not sure if this can happen. The weechat documentation doesn't state
that it can, but since the if condition was there, maybe it can. If it
can and does happen, abort the modification, which is better than
something unexpected happening.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously, if a multiline message was edited or reacted to, all of the
new message would be crammed into the last line of the already printed
message.
This change updates each line separately, so if the number of lines in
the message doesn't change, the message will still be rendered correctly
after edits or reactions.
If the number of lines change, the rendering is still improved, however
I don't know if it is possible to insert or delete lines in a weechat
buffer without re-rendering the whole buffer, so it won't be perfect. If
the number of lines of a message decreases after an edit, the extra
lines will still be present, but they will be blanked. If the number of
lines increases, the first lines will be set as normally, but the last
line will contain all of the rest of the lines.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Instead of only updating the last line printed with the id of the
message (ts.minor, set in the date_printed field), update all of the
lines that is printed for that message.
This is necessary for updating all of the lines on changes, instead of
only the last. This will be implemented in the next commit.
This assumes that the lines after the first in messages always has an
empty prefix, and that the first line of a message always has a prefix.
This holds for the messages I have seen (single-line, multi-line as well
as me-messages and joins/quits).
Other approaches I considered was to count the number of newlines in the
message and update the same number of lines, or to check the existing
date_printed field of the messages and update the ones that had 10
digits or more (since current timestamps has that, and the slack id
currently has 6 digits). However, I dropped them in favor of the prefix
solution which seems better.
|
|\ \ \ \
| | | | |
| | | | | |
Check that the bot_id exists before using it
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Instead of just checking that bot_id is not None, check that it exists
in the list of bots. This prevents a KeyError when trying to access a
bot that doesn't exist in the list.
This KeyError would happen if you use a reminder. The message from
slackbot then has bot_id B01 which is not in the list of bots from
rtm.start and gives bot_not_found if trying to look it up with the
bots.info API endpoint.
By ignoring the bot_id we fall back to the user/username, which in the
case of reminders is slackbot, so the name appears just as the other
messages from slackbot.
Fixes #420
|
|\ \ \ \
| |/ / /
|/| | | |
Fix HTML entity-encoding of outgoing messages
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
We have to replace the & before we replace < and >, otherwise the & in
< and > are going to be replaced. Additionally, we need to end the
sequences with ; which was missing.
|
|\ \ \ |
|
| |\ \ \
| | | | |
| | | | | |
Update nicklist when team member presence changes
|
| | | | | |
|
| |/ / / |
|
| | | |
| | | |
| | | |
| | | | |
Fixes: #362
|
| | | |
| | | |
| | | |
| | | | |
Closes: #315
|
|\| | |
| | | |
| | | | |
Put users in groups according to presence
|
| | | |
| | | |
| | | |
| | | | |
Fixes #398
|
|\ \ \ \
| | | | |
| | | | | |
Fix AttributeError on /slack status in team buffer
|
| | |/ /
| |/| | |
|
|\ \ \ \
| | | | |
| | | | | |
Set correct number of unread messages in hotlist
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
While the commit 6718e2f fixed buffers not appearing in the hotlist,
after it the number of new messages for each buffer was gone. This makes
the number of messages for each buffer shown again.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix opening thread buffers
|
| |/ / / / |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Similar syntax as for adding reactions:
3s/foo/bar/
Fixes: #153
|
|/ / / /
| | | |
| | | |
| | | | |
Not sure this actually matters as weechat seemed happy with the wrong return codes too
|
|\ \ \ \
| |/ / /
|/| | | |
Properly escape <&> when sending messages to Slack.
|
|/ / /
| | |
| | |
| | |
| | | |
Signed-off-by: Ben Kelly <bk@ancilla.ca>
Signed-off-by: Ben Kelly <btk@google.com>
|
|\ \ \
| | | |
| | | | |
Don't send typing notifications for threads, since Slack doesn't like that
|