Say, I have a channel named teamA, and also got a channel named subTeamB, and subTeamB is actually a sub-team of team A, e.g. all members in subTeamB included in teamA.
In this case, is that possible to have subTeamB nested inside teamA?
No, you can not have channels within a channel in Slack.
As a workaround you could name the channels in a way that they reflect sub-channels.
Examples:
#teamA-subTeamA
#teamA-subTeamB
This is also what Slack recommends on its documentation page about Organizing and naming channels.
They did say they were working on it, or something to better organize:
https://twitter.com/slackhq/status/503652089755873280
Makes sense. We're exploring better ways to organize / group large
amounts of channels. Stay tuned! ✨— Slack (#SlackHQ) January
9, 2016
Related
I have an old slack app that relies on channel.join. I need to migrate conversations.join. The APIs have two different keys. Channels allows you to use the channel name, and conversations requires a conversation id. How do you convert them? conversations.list -> loop?
You will probably have to loop. The new API is very focused on IDs and the advice is to store the IDs of the channels you want to join not their names, because name can be changed at any time. It feels like they’re saying you can join by name if you want but we won’t make it easy for you :) It's probably good advice tbh.
I am taking over maintenance of a multi-file golang program and now trying to understand the code flow. One feature of golang is the use of channels for sending values to another part of the code base. This feature can make tracing and understanding the code flow difficult, as the execution will resume at the receiving end of the channel, which may well be in a different file and may have a different name.
When reading through the code, I can see where data is being sent to a channel, but I do not see an intuitive or easy way to figure out where it is being received.
Is there a way in gloang to find out where (as in filename:linenum) a data sent through a channel is received?
No, because multiple places can receive from the same channel, and multiple instances of the same function can be receiving from different channels. Your best bet is to follow the channel itself around - look at where it's created, then what it gets passed to, and find what is receiving from it that way.
I am developing using the Microsoft Mail Graph API I'd like to provide conversation actions.
For example, if a conversation has several unread messages, marking as read the last one doesn't mark the whole conversation as read (like I'd want).
I didn't see any conversation-level API to mark as read / mark as unread or delete whole conversations.
What would be the best way to achieve conversation updates?
Thanks!
I'm afraid there are not APIs specific to email conversations. In order to process a batch of emails within a conversation, you'll need to update each message individually.
You can determine which messages belong in the conversation using the conversationId. Keep in mind however that a "conversation" is a somewhat loosely defined entity. Exchange generally gets good results but it isn't foolproof by a long shot (for example, a conversation with 10 participants, forward it to an 11th and you often end up with two threads in a single "conversation").
I would suggest using JSON batching for something like this. Batching allows you to bundle multiple Graph commands into a single call. Using batching you could update up to 20 messages at a time.
i am trying to use the API to get the total number of messages posted by each user during a certain period. Ideally, I would be able to break the number of messages by the type of channel (public, private, direct messages.) Is this possible? I am looking through the API documentation but haven't found anything. I would be using it to create a script that would automatically generate weekly activity reports.
Thank you for any advice you can provide!
There is no special endpoint for this information as far as I know, but you can generate something similar yourself by looping though all channels and counting the message per user, e.g.
Get list of all channels with conversations.list
Get history of each channel with conversations.history
Count messages per user
Of course your results would not include message from channels, that your bot has no access too (e.g. some private channels, direct message channels).
Writing a slack bot and I would like to be able to get a list of all the channels my bot is a member of. One way to do this is to call https://slack.com/api/channels.list, get a (potentially large) list of all channels and then search for the channels that the current (bot) user is a member of. This works fine, but seems very heavy handed.
Is there a better way? To get just the channels that a given user is a member of?
I think users.conversations is what you're looking for. Without additional params it will return all public channels the calling user is a member of.
No, there is no shorter way to get this information.
Actually, Slack recommends to use the new conversations methods for this task, since the members property in all other methods, e.g. channels.list has recently been changed to only return a truncated user list. See here for details.
With conversations you have to make an additional call per channel to get all channels a user is a member of. However it will work with all types of channels (e.g. public channels, private channels) at the same time.
The basic approach is:
Get the list of all conversations from conversations.list
Get the list of members per conversation form conversations.members.
So if you want your Slack app to be future proof and also work with large number of users better use the conversations methods for your task.
FYI you can now list user channels/conversations using:
https://api.slack.com/methods/users.conversations