-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid channel when targeting a user #40
Comments
Behind the scenes we keep a list of all channels etc ( At deploy doesn’t bother me and makes sense... after things have loaded (an event gets fired from the second output on the |
Hello, yes we have many users (400+) and a lot of channels too (200+) |
Yeah, my guess is the fact the bot and user have never conversed means there is no channel created. I would be hesitant to add channel creation logic to the node to handle these scenarios but am open to suggestions for sure. It's been a while since I reviewed the api as well so maybe they have a way to just send the username and the channel gets created on the fly. |
Thanks, would there be alternatives ? I'll try with other users that I know have never conversed with the bot to see if it does it for them. |
You could inject a node in between that would use the But I may have some bad logic as well. I'd have to research the api again to see if it allows for pure |
Thanks, I just tested and it seems your therory is good, it happens with users that never interacted with the bot. |
Yeah, and the spec seems to indicate the rtm api does not allow sending the username directly: https://api.slack.com/events/message However, https://api.slack.com/methods/chat.postMessage#channels indicates that it accepts id or Unless you really need to use rtm for messages I would consider using the Make sense? |
Yes thanks, will try that ! |
just to make sure that I'm on the good path, I would use chat.postMessage ? |
Yes, use |
Seems to work ! Thanks a lot ! Closing this. |
Going to reopen as the logic in the web out node is too strict. |
I often get a
"invalid channel: @username"
message when targeting a user using the @username syntax in msg.topic.I noticed it often happens shortly after a deploy but seems to happen randomly too. What could be causing this ?
Thanks !
The text was updated successfully, but these errors were encountered: