Extends
Methods
-
del()
-
Delete the messageEvent
- Overrides:
- NXMEvent#del
- Source:
Returns:
- Type
- Promise
Example
messageEvent.del().then(() => { console.log("message event deleted"); }).catch((error)=>{ console.log("error deleting message event ", error); });
-
delivered()
-
Set the messageEvent status to 'delivered'.
handled by the SDK- Overrides:
- NXMEvent#delivered
- Source:
Returns:
- Type
- Promise
Example
messageEvent.delivered().then(() => { console.log("message event status set to delivered"); }).catch((error)=>{ console.log("error setting message event status to delivered ", error); });
-
<async> fetchImage()
-
Download an Image from Media service
- Source:
Returns:
the dataUrl "data:image/jpeg;base64..."
- Type
- string
Example
messageEvent.fetchImage().then((imageData) => { const img = new Image(); img.src = imageData; document.body.appendChild(img); }).catch((error) => { console.log("error getting image ", error); });
-
seen()
-
Set the messageEvent status to 'seen'
- Overrides:
- NXMEvent#seen
- Source:
Returns:
- Type
- Promise
Example
messageEvent.seen().then(() => { console.log("message event status set to seen"); }).catch((error)=>{ console.log("error setting message event status to seen ", error); });