Parsing messages sent with Rocket Chat - chat

I am trying to develop an application which parses the text entered in the rocketChat box. I have checked the RocketChat Api: https://rocket.chat/docs/developer-guides/rest-api/ and there is not any way to catch this event (message sent in box). The only way to do it is to obtain all the messages sent with the method channels.history. https://rocket.chat/docs/developer-guides/rest-api/
Any idea on how to do it?

You may checkout rocket chat node js sdk. Use driver.reactToMessages function to listen to any messages in a channel

Related

how to kick someone from videocall agora with flutter

I'm creating an app for video or voice call with flutter for Android / iOS. And I want to enable someone to kick another from a call. Is there anyone who knows how? any idea?
There are lots of functions in RtcEngine() and I don't know which one would remove another users.
There's a couple of ways that I can think of to do this:
RTM (new name: Signalling)
Using RTM, you could send a message to the user you want to kick, which reacts to logic on the device that then restricts it from rejoining the room. For example, send a plain text message such as "kicked_from:channel-id-here", or a json string if you want to add more complex messages that are decoded by your application:
"{\"action\":\"kick\",\"channel-id\",\"reason\":\"abuse\"}"
This is then saved into a map for example, which then is checked whenever they try to rejoin a channel.
RTM can be found here.
Via Token Server
When kicking someone from your room, you could send a message to your token server with a specific user's ID.
The token server could then revoke that token from joining the channel, resulting in them then leaving the channel. You'd have to then add some logic to either the token server or the client to prevent that user to request a new token and rejoining.

Error out when click Google Chat Bot interactive button with NET.CORE

I am creating a bot for the hangout chat via C#, I was able to create simple messages and messages on cards, but I am not able to work with CARD_CLICKED.
It displays the message that could not connect to the bot, try later.
Retrieving the error message, I noticed this message:
Google.Apis.Requests.RequestError Unsupported path name in update message field mask.
How can I get this to work in C#?

capture json message sent by facebook to bot framework

How can i track the response that was received to bot framework from facebook or any another social network ?
For example , I am sending the location on facebook ( which is not available on framework ) and i am not able to know where it's sent .
Is there any tracker on the bot framework site that can help me do that ?
There are several ways to get information about the messages sent to your bot.
Create an Azure App Insights instance and register it with the bot framework portal and the Bot Framework will send traces to your bot including exceptions, errors, etc.
Run NGROK locally on your machine and point it to your local bot in debug, and you can use the NGROK console to see the rest calls.
Inspect the post as it comes into your bot and log the message from the message context.
--jim
The message from facebook, including the location sent by user, is available from:
var facebookJson = activity.ChannelData;

Getting first thread id for Facebook XMPP using Asmack

I am using asmack on Android to talk to Facebook XMPP.
When an incoming message arrives, I get the (XMPP) thread ID from that message/chat. Sending further messages (using that ID) works just fine.
The problem starts when the first message is sent from my application's side. Then I don't have the current thread ID (since they change on the Facebook server). And sending the message does not work. My system sends OK, but it is never registered on Facebook.
So, how do I get the initial (XMPP) thread ID from an inbox chat?
I tried using the graph API to send a message (inbox/comment). But it does not work (you have to be whitelisted... whatever it is).
Please help, how can I initiate an XMPP thread, and not just respond?
Study the one of open source project which used Asmack then you will be get clear idea how its working. Beem-Project is one one of open course project which used Asmack
It turns out that Facebook will accept any thread ID you give it. There was a problem in the way I handled new message threads created locally, rather then external created threads (from Facebook). Now everything works, even firing up a thread from my application, using asmack.

GAE channel API chat

Currently im trouble shooting some code that I wrote to create a chat room. I will include the code if necessary but for now I just wanted to hear some possibilities for the problem im having. So basically I have client1 that is listening to a channel and then when clien2 sends a message to the server the message is then sent from the server to all available users. What is happening is that client 2 will send the message and it will be displayed on his browser but client 1 will not receive the message until he refreshes the page or types in a message of his own. So I would think that user presence is being detected fine since the message eventually gets sent to all available users but im not sure? Thoughts?
The Google App Engine blog has a nice case study that talks about how to do this.
They store a list of channel ID's in memcache and send update messages to each of them. They mention that race conditions make memcache not ideal, but it worked well enough for their demo.