| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
It's now possible to set and clear the uses status.
For now it's not possible to set the status emoji or the status expiration.
Signed-off-by: Pierguido Lambri <plambri@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The user can now set the presence with:
/slack presence away
Or:
/slack presence active
Signed-off-by: Pierguido Lambri <plambri@redhat.com>
|
|
|
|
|
|
| |
This enforces us to check that buffer_pointer is set, so we don't
accidentally operate on the core buffer, which is what is done when
buffer_pointer is an empty string.
|
|
|
|
|
| |
If a bot uses multiple nicks, we have to add all of them to the
nicklist, so none of the nicks are shown as offline.
|
|
|
|
|
| |
Mostly because it's a bit simpler not having to handle this suffix when
linkifying text.
|
| |
|
|
|
|
|
|
| |
This can happen in channels shared between workspaces if one of the
workspaces are removed. Then messages from users in that workspace will
not have a user field anymore, but instead a user_profile field.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It looks like from_url should be unescaped, but title_link and image_url
should not. Slack seems a bit inconsistent here though, as an image in
an attachment will use the unescaped title_link, but the link in the
title itself will use the original (possibly escaped) one. And the title
for the image link will use the original (possibly escaped) title, while
the title in the attachment will unescape it.
I suppose you're not supposed to HTML escape (or Slacks version of it)
URLs in title_link and image_url (which makes sense), but Slack does
escape from_url if you send a message with a link to a thread message,
so we have to handle that.
|
|
|
|
|
| |
Also mark a lot of fields as NotRequired as tombstone files doesn't have
these fields.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The team id in the profile may be either the enterprise id or the
workspace id depending on the token used and the workspace the user
belongs to, so if the user has enterprise_user set, check the
enterprise_id too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's possible to have a token that's only for one workspace in an
enterprise grid. For me with such a token, it returns channels in all
workspaces in client.userBoot, but only channels in the tokens workspace
in client.counts. This meant that we didn't get last_read for all
channels we opened, and additionally some methods like
conversations.members would fail with "channel_not_found" for those
channels.
This filters the channels from client.userBoot by checking that the
channel is in the current sub workspace, if the token we're using is not
an org level (for all workspaces the user is in) token.
Additionally it raises an error if any of the channels to open isn't
included in the response from client.counts to prevent missing last_read
for any channels if there are other channels that isn't included. I
could have filtered the list of channels to open by the channels
included from client.counts, but I don't want any channels to just
silently be ignored.
|
| |
|
| |
|
|
|
|
|
|
| |
Usually, only the `d` cookie is needed, so this allows you to only
specify the value of that cookie without the key if you don't need to
set any other cookies.
|
|
|
|
|
| |
The cookies need to be encoded for the Slack API to accept them, so this
makes it work if the config is set with cookies that are not encoded.
|
|
|
|
|
|
|
|
|
|
| |
I have display_thread_replies_in_channel and often search for the thread
hash in a buffer to scroll between the different messages in the thread.
After changing the hashes to use only letters, this has made the search
match other messages much more often (matching words including the hash
characters), which is inconvenient.
This reverts commit 78bdd84765e53d4c33d963f0d3a8c54652b64ca9.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it complete nicks that spoke last first, and then nicks that
haven't spoken, and lastly yourself. This is the same as the IRC plugin
does by default.
It adds completion of nicks both with and without @, as the default
completion of nicks from the nicklist is just alphabetical.
Completion of workspace nicks is removed for now. It only completed
workspace nicks that are already loaded, so it might be better to
complete workspace nicks in the `input_complete_cb` function instead
(since functions using `completion_list_add` can't be async, only
`input_complete_cb` can).
|
| |
|
| |
|
|
|
|
|
|
|
| |
It became very confusing to use None to represent it being set without a
value, so use True instead. If it has a value it will always be a
string, so you can still distinguish between an option without a value
and an option with a truthy value.
|
|
|
|
|
| |
I have a huddle message in an IM on an enterprise workspace that doesn't
have this field.
|
|
|
|
|
| |
It seems that if you request conversations.info right after joining a
channel, it's missing in the response.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some enterprise workspaces are restricted in which API methods they can
use, so we have to use some of the APIs the official web client uses
(which can't be used by OAuth tokens) instead (mainly to initialize the
workspace with client.userBoot and client.counts, and to connect to the
websocket).
This also has the benefit of being more performant, as the API methods
the web client uses are more suited for creating a client than the
official API methods.
I think which API methods are restricted may be configured by the
workspace admins, so it may not be the same for different workspaces,
but for me it seems to be at least rtm.connect, users.conversations,
conversations.list and conversations.members, so these are the ones I've
changed to be conditional on the token type.
|
|
|
|
|
| |
This originally had to be returned here because it was an async
function, but now that it's a sync function this can be simplified.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This is perhaps a bit hacky, but it makes the type checker enforce that
we complete the async initialization of SlackConversation instead of
getting a runtime exception.
|
| |
|
|
|
|
|
| |
This means a lot of methods don't have to be async. It's especially
useful for the next commit adding conversations completions.
|
|
|
|
|
|
|
|
|
|
|
| |
Adds all known nicks in the current buffer with an @ prefix to the
nicks completion.
Disables the API search based nick completion for now until it's working
properly. It currently doesn't have any context of which
conversation/thread you are in, so you often get other nicks than the
one you want to complete first. Additionally, it doesn't work with OAuth
tokens.
|
| |
|
|
|
|
|
|
|
| |
This currently has the limitation that the user has to be known to
wee-slack for the mention to work. That is, there needs to be some
interaction with it (message or reaction from or mention) or it has to
be in the loaded members in any of the loaded conversations.
|
|
|
|
| |
This is an alias for @channel.
|
| |
|
| |
|
| |
|
| |
|