| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
Allows autocompletion of nicks to work (instead of error from `nick_completion_cb`)
|
|\
| |
| | |
Add completion of custom emojis
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's simpler to just reload the whole list instead of adding and
removing specific emojis, especially since we would have to remove
aliases for an emoji when the emoji is removed (and we don't store if an
emoji is an alias or not).
Since this probably doesn't happen that often, it shouldn't be a problem
to do it this way.
|
| |
| |
| |
| |
| |
| |
| | |
After the last commit, the EMOJI variable is accessed in the
initialization of SlackTeam. This made some tests fail since they don't
run the main code, so it would not be defined. By setting EMOJI to an
empty list in the top, we ensure that this is not a problem.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This loads the list of custom emojis for each team after wee-slack has
connected to the team, and adds them to the emoji completion list for
that team.
The list of custom emojis is only loaded if the list of the standard
emojis has been loaded, since it would be a bit strange to only have
completions of the custom emojis.
|
| | |
|
| |
| |
| |
| |
| | |
This prevents an error that EMOJI is not defined when trying to tab
complete after the emoji list could not be loaded.
|
| |
| |
| |
| |
| |
| |
| |
| | |
By printing the exception instead of sys.exc_info, we get more useful
error messages, including the path to the file it is trying to load if
it can't find it.
Fixes #431
|
| |
| |
| |
| |
| | |
Emoji completion works fine for me without it, so this doesn't seem to
be necessary anymore.
|
|\ \
| | |
| | | |
feat: Remove Slacks auto prefixing of url protocols
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | | |
Use the timestamp of the last message in mark_read
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
All of the times we used sorted_message_keys, we were accessing some of
the last elements in the list. Since OrderedDict is doubly linked, using
reversed(keys) and next/islice is much more efficient than converting it
to a list.
Because of this the method now returns a generator in reverse order. It
is renamed to main_message_keys_reversed to make it clear that it isn't
returning thread messages, and that it is now reversed.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
By using an OrderedDict, we can sort the messages when we store them, so
we don't have to sort them each time we access them with
sorted_message_keys.
If we are guaranteed that the message we store is always the newest
message, we can even drop the sorting, as OrderedDicts are sorted in
insertion order. However, I'm not sure if we might store an older
message at some point, so to be safe, we sort the messages each time we
store one.
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When sending a mark read message to slack, use the timestamp of the last
message in the channel, instead of the current timestamp. This should
prevent potentially marking messages as read, if they arrive after
mark_read was called and the clock of the slack server and the machine
wee-slack runs on is not exactly in sync.
According to issue #307 messages might also be marked as read if they
arrive right after you switch buffer, and you have a slow internet
connection. Though, since the time used in mark_read is set
synchronously when the buffer is changed, I'm not sure if that can be
the case. Either way, I think this patch should fix the issue.
If there are no messages in the channel, fall back to using the current
time as timestamp.
Fixes #307
|
|\ \ \
| | | |
| | | | |
Attachment tests and minor fixes
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The title and from_url fields of attachments doesn't seem to be escaped,
so the check if they already are in the text didn't work if the link
contained e.g. an ampersand.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is a follow-up of commit 0345ba1. That prevented rendering the link
if it already was in the text. This prevents rendering both the
title_link and from_url if they are equal, but not in the text. In this
case it only renders the title_link.
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
Add ability to open multiparty DMs with /query and /slack talk
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
conversations.open doesn't return `unread_count_display` for MPDMs for
some reason (only DMs), so use mpim.open instead.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Fix incorrect parameter name for MPDMs: `users` instead of `user_ids`
- Accept comma-separated nicks instead of space-separated to match
weechat's `/query` syntax
- Check user IDs instead of usernames to find channels
- Use `SLACK_API_TRANSLATOR` instead of hard coding API methods
- Update documentation
|
|/ / /
| | |
| | |
| | |
| | | |
`command_talk` can now accept multiple arguments, which allows commands
like `/query user1 user2` to open a MPDM with user1 and user2.
|
|\ \ \
| | | |
| | | | |
Allow sending special messages by escaping them with / or \
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This allows you to send messages starting with / or messages like s/a/b/
and +:test: as normal text messages instead of performing the action
they normally would. This is done by prefixing the message with a slash
(/) or a space ( ), and then the prefix character is removed from the
resulting message.
Allowing / as a prefix, so you can write e.g. //slack is the normal way
to send messages starting with / in weechat. This will work for all
messages starting with a slash, but won't work for e.g. /+:test:, as
that is interpreted as a command. Using space as a prefix is the way
Slack does it. This will work for all messages.
|
|\ \ \ \
| | | | |
| | | | | |
Hide closed group dms
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Group DMs shouldn't be displayed just because `is_member` is `True`,
because it always will be. Instead, if a channel/DM/whatever has an
`is_open` property, use that, and only fall back to `is_member` when
`is_open` isn't present (such as for channels).
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Make the method a bit easier to follow, and don't use exceptions for
flow control.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Add option to disable sending typing notification to Slack
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- Many IM clients that support alerting the receiving user that you're
typing include an option to disable this behavior. This commit adds
the `send_typing_notice` boolean option. When it is false
`typing_notification_cb` is not registered for the
`input_text_changed` Weechat signal. By default this option is
true.
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
Hilight team identifier in slack
|
| |/ / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Remove the nicklist from the team buffers
|
| | |/ / /
| |/| | |
| | | | |
| | | | | |
This list is not populated anymore, so we shouldn't show it at all.
|
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
- Fix a regression from 95fa08 that disabled the nicklist in multi-person direct
messages
|
|\ \ \ \
| |/ / /
|/| | | |
Add irc_privmsg to message tags; remove unused "highlightme" tagset
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In plain weechat, irc_privmsg is used for all messages received via the
IRC PRIVMSG command, which includes messages to channels, not just PMs.
Not having this tag means some weechat settings related to hilighting
don't behave as expected, and some other scripts like anotify don't
play nice with slack buffers.
Fixes #283.
Signed-off-by: Ben Kelly <bk@ancilla.ca>
Signed-off-by: Ben Kelly <btk@google.com>
|
|\ \ \
| | | |
| | | | |
Set the server buffer variable on server buffers
|
|/ / / |
|
|\ \ \ |
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Add mpim API type for multiparty DMs
|
| | | | |
|
| | | | |
|