Skip to content
This repository has been archived by the owner on Sep 29, 2021. It is now read-only.

Support MessageML v2 & Structured Objects #58

Open
jonfreedman opened this issue Jul 2, 2017 · 3 comments
Open

Support MessageML v2 & Structured Objects #58

jonfreedman opened this issue Jul 2, 2017 · 3 comments
Assignees

Comments

@jonfreedman
Copy link
Collaborator

No description provided.

@mistryvinay
Copy link

Hi Jon,
Any chance we could update Hubot to support the V4 endpoints which are now available
https://rest-api.symphony.com/docs/messagemlv2

@jonfreedman
Copy link
Collaborator Author

jonfreedman commented Jul 30, 2017

Development is taking place on the 1.46 branch. This will take a bit more development work to get ready, the nock-server scripts need to be extended further to handle the fact that if you send <messageML>Hello world!</messageML> you now get back <div data-format=\"PresentationML\" data-version=\"2.0\">Hello world!</div>

For reference here is sample output from polling a v4 datafeed, looks like random <br/> tags may also be inserted:

[{
	"id": "ePWX9h",
	"timestamp": 1501432861213,
	"type": "MESSAGESENT",
	"initiator": {
		"user": {
			"userId": 346621040656398,
			"firstName": "Jon",
			"lastName": "Freedman",
			"displayName": "Jon Freedman",
			"email": "[email protected]",
			"username": "[email protected]"
		}
	},
	"payload": {
		"messageSent": {
			"message": {
				"messageId": "ze_erMbOemaKZzvPhhodSn___qJroK3ldA",
				"timestamp": 1501432861213,
				"message": "<div data-format=\"PresentationML\" data-version=\"2.0\"><br/>mozart ping</div>",
				"data": "{}",
				"user": {
					"userId": 346621040656398,
					"firstName": "Jon",
					"lastName": "Freedman",
					"displayName": "Jon Freedman",
					"email": "[email protected]",
					"username": "[email protected]"
				},
				"stream": {
					"streamId": "YUoYm7ObKgjQzIOe_-nYXH___qiA61_2dA",
					"streamType": "IM"
				},
				"externalRecipients": false
			}
		}
	}
}]

@jonfreedman
Copy link
Collaborator Author

I've released version 3.0.12 which supports sending MessageML v2 - the adapter still subscribes to a v2 datafeed so you cannot listen for structured objects but given hubot is designed to be text based I'm not sure that is a big issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants