I'm using Quickblox in Ionic (Angular), with Parse for my database. Whenever I send friend requests, it only sends one, and the receiver only receives one, but the listener goes off some random number of times (3-10), Consequently, if I send a chat, it will send the same number as there are friend requests. However, if I hard-code in the user who sends and receives chats, it the chat receiver still does the same thing.
I'm using Parse to manage Quickblox accounts. So I'm fairly theres some issue with session management and connections to Quickblox.
Related
It is my very first time to write a slack bot and i am wondering how to design it.
The bot supposed to be available and respond to end-users' messages immediately.
The thing is that I need that the bot will also send schedules messages to registered users with automation results.
Use case example:
A user sends a message to the bot and registered to a service that
will check for changes in X. On a specific interval, my backend will
call an automation that checks for those changes and will send a
message to the user with the results.
What will be the best practice for this scenario?
Here is a basic outline.
1. Basic setup
Slack app with bot user
Database
Scheduler (e.g. local CRON service, or web-cron like cron-job.org)
2. Registration
Use Events API to listen to messages from users send via mention (app_mention) or direct message (message.im)
You app needs to store the received "registration" from each user in a database
Respond to user request directly if needed with chat.postMessage
3. Scheduled response
Scheduler calls your app
Your app check if responses are due with a database query
If yes: App sends responses to users via chat.postMessage (but not more than one message per sec due to rate limiting)
I'm trying to have my backend create a poll for a given user and when the user responds to the poll receive the response on the backend. However I cannot find a way to do the second part with an API available.
I know I can use Incoming Webhooks to send a command to users slackbot channel: /poll .. ... ... however I'm unsure how to receive a response from when user selects one of the options in the poll.
OK, one approach would be
Slash command for the /pollcommand, it will send a request to your app every time a user enters the command
Your app can then sends the actual message containing the poll details back to the channel incl. message menus simply by responding to the slash request or with Web API e.g. chat.PostMessage
User chooses polls option from message menus. Chosen option is send back to your app by Slack.
This is just one approach. Alternatively you could also show the options as message buttons or open a Dialog for the user.
I would advise against using outgoing webhooks, since its no longer part of the main features (and slash commands and interactive menus will send a request directly to your app anyway). Also Web API / chat.PostMessage is better than Incoming webhooks.
On facebook Chatbot or others platform we can send message directly to the user.
So for one question we can send multiple answer.
Now, that i'm developing for Google Home, I need to do the same.
I didn't find this opttion.
Dialogflow HTTP call to my server is the only output available.
So is there anything i missed to send message back to user in case I have a multiple messages answer?
(Or do I have to bufferise very message my hook creates before sending it back?)
Thanks
The conversation model for the Google Assistant is different - you can only send a message to the user in response to the user sending you a message. You can only send a single response, but it may have multiple parts (up to two Simple responses, containing messages, plus other features such as cards and carousels).
If you need to send multiple things back - you may need to rethink how you're doing it or how much you're sending back at a time. The Assistant is primarily for audible responses, and a long audible response is generally not a good UX.
We have an internal web app used by staff members of the company, and are in the process of integrating it with Microsoft Outlook via the Microsoft Graph API.
We are using the Graph API to subscribe to notifications for Outlook mail messages with a specific category (via webhooks).
We are also using Graph to send mail from within our application (using the sendMail endpoint). Messages sent this way are given the same specific category, so that it is automatically imported via the notifications.
Given this usage, we would like to see all incoming replies to messages originally sent via the API to also receive the category, so that we can receive notifications for and import them as well. But this is not the case - replies arrive without the category we are looking for.
The strange thing is, manually applying a category to a sent message via the Office 365 Outlook web application UI does result in incoming replies adopting the same category. What is the difference? Is the web UI maybe applying the category to the conversation as a whole, whereas the API is applying it only to a single message? Are we able to replicate the behaviour the UI creates, via the API?
Update - some clarification:
We use the API to send mail on behalf of A, and give it a category in A's mailbox. In our case, A is a staff member, and we want to bring their mail (when appropriately categorised) into our web app. B could be anyone - possibly (even likely) not using Outlook for their mail. When using the Outlook web app, if A categorises a message they just sent, then incoming replies from B also automatically receive that category when they arrive in A's mailbox. When we send a message on A's behalf via the API and also give it the same category, replies from B arrive uncategorised.
I have successfully setup my slack bot app, have enabled events etc. I want to receive any direct messages that the members of my slack team send to my bot. For this, I have only enabled Bot Events and No Team Events like below
However, I do not get any event on my webhook on this setting.
If I enable message.im event under Team Events, then I start getting events. But then, I get every message that the user (who has installed the app) sends to any other user in the team.
How do I get only the messages that are sent to my bot user?
Update 1
Based on this SO question I created a private channel with the bot user. Even then, the messages in the private channel do not arrive in my webhook with the above event subscriptions.
Update 2
After reinstalling the app, it seems to be working fine. I have only used it for few minutes after the reinstall so far. I will keep posting here how it goes. It would still be interesting to know what went wrong where.
It is normal behavior that your script receives all messages (for every channel your bot is a member of), not only the messages sent directly to your bot. At this time you can not filter further in the event configuration. So you need to filter out any unwanted message in your script handling the event.
See also this answer.