how to sync an id of an object with a backend via restKit? - restkit

I have a Topic object which i created on the client-side iPhone.
When I post it to the server the topicID attribute was set to null.
now I wish to update that topic but I don't know the id of that topic.
Does anyone knows how to solve it?
I've tried to delete the created topic from the local store and fetch for new topics from the server but it didn't work.

If some one is interested the answer is that when the client receives a response it updates the id

Related

Use Nchan to post to logged in users only

I am setting up an application with realtime events using nchan (https://github.com/slact/nchan). The application itself is built on the Laravel framework. However, for now everyone that subscripes to specific sub-channel will get new events as soon infomation is pushed to the corresponing pub-channel.
I want to limit that so only logged in users should be able to subscribe to events. Hence, if I am not logged in, it should not be possible to create a websocket and listen for events from for example http://www.example.com/chat/pubchat?id=some_id.
Is there any way to make this possible?
As far as I know, I cannot use Nginx/Nchan to make database queries to get only logged on users that way. And Laravel itself cannot limit subscribers since that is handled by Nginx/Nchan (but on the other side, can make database queries).
Thanks for any tips!
EDIT: Seems that I might can use the Drizzle module (https://github.com/openresty/drizzle-nginx-module) and use the session ID as identifier. So if that ID is not present in the session table the connection will be blocked.

Spring STOMP - immediate response

I am implementing an Angular client that connects to a spring boot backend via STOMP.
When a client connects and wants to create a "business-group", said group is created in the backend and gets a UUID; and from that moment on other clients should be able to send to and receive messages from that group.
So I am creating a topic with said business-group id in the destination - something like
#MessageMapping("/foo/group/{id}")
However I want the creator of the group to immediately receive the business group id to be able to subscribe to it himself as well. And to be able to share the id with others (user to user).
I have used raw sockets for this before, so I was able to just use the connected user's session and then send back the id to him after the had sent the create-message. But since the session handling was business-group-ID based (so that only the users in a specific group receive the messages from that group), the whole dividing user sessions by business-group-ID had to be done manually and I was looking to upgrade this to something that does that handling for me.
However I am not sure how to achieve this with spring stomp. So my question is, is there a way for the creator of such a group to immediately receive the id as an answer/response to his initial "request"?
Because he can't subscribe to anything before he receives the group id.
Background:
It's basically like a chat app where a user can create a group/chatroom and then share it with others (via URL - which contains the ID); everyone that subscribes to it can then receive msgs from it and send msgs into it. But to do so the creator first needs the created ID.
I found a solution. This can be done via #SendToUser
#MessageMapping("/group.create")
#SendToUser(value="/topic/group.create", broadcast=false)
public Response createGroup(#Payload Message message) {
...
return createResponseWithId();
}
On the other end you only need to subscribe to '/user/topic/group.create'.

Add unique key of my own to slack event requests

I created a slack app with distribution (multiple clients)
and I subscribe to events several events like a message posted in a channel.
Beside the team_id field for identifying the client team - is there an ability to put my own key for a client?
Thank you.
No, Sack does not store any custom data for you. Its your job as an app developer to store all team related information for your app and link it to the Slack team_id. This is usually done with a database.
You can however include custom IDs with Slack requests, e.g. in the response you get from an interactive message. See this answer for more details on how this works.

How to get updated message in yammer using API

I get all messages using API and store their in my database.
If an user modify his message that I have been got, how could I get this new message modified?
Does someone know what method to use or what API because I need to retrieve this text modified and update the older
Thanks a lot for your replies
You should use the [Data Export API][1] for this task. The MessageVersions.csv file will be updated with changes that you can review. There have been no changes to the REST API surface for the Edit Post feature.

How does the CRM Email router set the RegardingObjectId on incoming emails

We have a system setup where complaints from a website form are emailed to an address and subsequently picked up by the email router and placed in a queue. Users then create a case from these emails (custom code create the case and populates it based on the email content and the queue it arrived into)
Some of the emails are coming in and the regarding object is set to an existing case even though the email and the case are not related. My guess is that this is something to do with the fact that the emails are coming into the queue from the same web address (complaints#abc.com)
Can somebody explain to me the criteria the email router uses for setting the regarding object of an incoming email
Thanks,
Neil
Looks like you are another "victim" of a feature called Smart Matching. For info on what that is and how to disable it, look here.

Resources