Closed nmwael closed 2 years ago
im double checking, something.. This might be related to the fact that Im running on mixed environments.. Trial for teams and msdn for azure..
Ok remade this on a clean system, and still no luck.
HI @nmwael, sorry - for some reason I missed this notification. Let me take a look today and get back to you
Right, so I checked out the latest code for demo-bot
from spring-bot-develop
branch and added your controller code above. It mainly works for me:
A couple of things:
/
. That should work, I'll raise a ticket. @ChatRequest(value = "echoUser {userA}", description = "writeback user details")
public MessageResponse echoUser(Addressable a, @ChatVariable("userA") Optional<TeamsUser> userA) {
if(userA.isPresent() && userA.isPresent()) {
return new MessageResponse(a, Message.of(Word.of("User "), userA.get()));
}else
{
return new MessageResponse(a, "user not found" );
}
}
And that will produce this output:
.. just checking something else - you did all the ngrok
stuff and you can see the bot being called on your Java console, right?
Yup
On Thu, May 12, 2022, 13:53 Rob Moffat @.***> wrote:
.. just checking something else - you did all the ngrok stuff and you can see the bot being called on your Java console, right?
— Reply to this email directly, view it on GitHub https://github.com/finos/spring-bot/issues/317#issuecomment-1124898504, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAF3P5YHIUNW4NWULP6ZXXLVJTWNHANCNFSM5T6AFF7Q . You are receiving this because you were mentioned.Message ID: @.***>
isn't that the other issue you raised? I think it's better if we treat them separately.
Let me see if I can help you debug this. If you type echoUser @somepersoninthechat
:
echoUser
method get called? userA
?Let's start with that.
Okay, yes the methods is called and I think you have addressed my problem.. I was @ someone who was not in the chat.. Is it not possible at all? Our chat bot is a system management bot, which configures stuff on users voice settings on teams. AFAIK the ms /who bot can check users not in chat, but is that because its not a 1-1 chat?
I think this is just a MS Teams thing - you can only mention people in the chat/channel. It's a pretty annoying restriction. Also, you can't mention yourself!! See:
I have this method but no matter what I do I cannot get the user mentioned (userA) in the chat to the bot:
Im very unsure if its just some kind of permission I need to give to my bot or application registration.. I can get the Addressable