Hi,
By looking at the current action handlers defined in [1] i couldn't find any specific way of describing possible activity entries that could be triggered from an initial activity. In other words, i'd like to have the ability of expressing specific actions (e.g. verbs) that would result in publishing a new activity according to that info.
This would allow to trigger actions still in the context of the social network (not outside like http or intent handlers) and at the same time allow greater flexibility.
To take an example in the context of appliance control, i could receive a notification suggesting actions to take, to be sent back via regular activities to the same account. here could be an example of notification:
{
"actor": {
"id": "
acct:entranc...@example.com",
"displayName": "Entrance lights",
"objectType": "urn:somenamespace:light",
"actions ": {
"urn:somenamespace:turn-on": {
"objectType": "SocialActionHandler"
},
"urn:somenamespace:turn-off": {
"objectType": "SocialActionHandler"
}
}
},
"object": {
"objectType": "note"
},
"title": "I detected some movement. Shall I do something?",
"verb": "post"
}
could trigger an activity like this:
{
"actor": {
"id": "
acct:john...@example.com"
},
"object": {
"id": "
acct:entranc...@example.com"
},
"title": "Turn on lights please",
"verb": "urn:somenamespace:turn-on"
}
In this example the actions are included in the actor object as they can represent generic actions always available, rather than being included in other parts of the activities (but this is an example).
of course this type of use cases triggers other questions but i'd be mainly interested in getting your feedback on the concept behind the "socialactionhandler" (i do believe it can also apply to other use cases to trigger social reactions that may not be the usuals suspects such as comment or like).
[1]
http://tools.ietf.org/html/draft-snell-activitystreams-actions-06