Search code examples
javaslackslack-api

Why are usernames and images not shown?


I implemented a slash command, which creates group direct messages (mpim). It was working fine for some time, but now usernames and images of participants are not shown after the chat is created.

broken usernames and images

Is there a way to fix this by using the API differently? Or do I need some configuration change? I suspect this started when connected our workspace to others and started using shared channels, but I'm not sure. Also, all the participants of the screenshoted conversation are in the same workspace/organisation.

EDIT:

I'm using a github project called slack-api to retrieve a list of users and create the mpim like this:

        Channel channelInfo = this.slackClient.getChannelInfo(channelId);
        List<String> userIds = channelInfo.getMembers();
        (...)
        Group group = slackClient.openMultipartyDirectMessageChannel(userIds);

The library version I'm using is v1.2.0.RELEASE, which is outdated. If you think this could be the cause, I try moving to the latest.

EDIT 2:

Looking at the code here and here, they seem to call POST https://slack.com/api/mpim.open sending a comma separated list of userids as users.


Solution

  • As it turns out, this seems to be a problem on Slack's end. See https://twitter.com/slackhq/status/1197903786435584001

    Slack on Twitter