kasunkv / slack-notification

Slack Notification task with advanced slack message customization for Visual Studio Team Services
MIT License
20 stars 9 forks source link

Unable to send a message direct to a user #7

Closed gugavaro closed 6 years ago

gugavaro commented 6 years ago

On the field Channel, I am providing my user @Gustavo, but it never works. I always get: Failed. Error: "An API error occurred: channel_not_found"

Logs:

2018-05-01T21:03:43.4063125Z ##[debug]{"slackApiToken":"****","messageAuthor":"Visual Studio Team Services","channel":"@Gustavo","uploadFilePath":"/home/everest/build/agents/agent-1/_work/1/s","message":"*** Ignore this Message, this is a Test","iconUrl":"https://********vsts.64x64.png","authorName":"CI-Linux - Build: 20180501.7 - Duration: 00:01:46","authorLink":"_build/index?buildid=141&_a=summary","title":"More Info","titleLink":"https://********.blob.core.windows.net/buildlogfile_20180501.7.txt","preText":null,"text":null,"color":"good","imageUrl":"_build/index?buildid=141&_a=summary","footerText":"Gustavo Varo on (buildpoc_sn)","footerIcon":null,"notificationType":"ChatMessage","fileTitle":null,"fileComment":null} 2018-05-01T21:03:43.5452982Z Task Failed. Error: "An API error occurred: channel_not_found" 2018-05-01T21:03:43.5537614Z ##[debug]task result: Failed 2018-05-01T21:03:43.5759359Z ##[error]Task Failed. Error: "An API error occurred: channel_not_found" 2018-05-01T21:03:43.5822900Z ##[debug]Processed: ##vso[task.issue type=error;]Task Failed. Error: "An API error occurred: channel_not_found" 2018-05-01T21:03:43.5905516Z ##[debug]Processed: ##vso[task.complete result=Failed;]Task Failed. Error: "An API error occurred: channel_not_found"

If I provide a channel it works great. Any ideas what is going on?

thanks, Gustavo.

kasunkv commented 6 years ago

@gugavaro Thanks for reporting the issue. I'll look in this and keep you updated here..

gugavaro commented 6 years ago

Any ETA on when this will be fixed? thanks, Gustavo.

kasunkv commented 6 years ago

@gugavaro I'll most probably have time to look in to this this weekend. I'll keep you updated here about progress.

gugavaro commented 6 years ago

I am assuming you will use the slackbot to deliver the message?

kasunkv commented 6 years ago

Fixed. Few improvements suggested by @gugavaro