Server will emit this socket event when a message sent with MESSAGE_SEND was successful.

This socket event will also be sent under the following conditions:

  • A post/task was created/updated/deleted
  • A space was archived or title was editted ('topic.updated')

Payload Parameters

NameDescriptionJSON type
categoryType of message sent. See table below.string
_idUnique identifier of message type: chatMessageId, postId, taskId.string
content
  • cid: (string) userid of user that created the message item
  • bodyText: (string) chat text, post text, or task text
  • status: (string) completion status of task: 'pending', 'complete'
  • dueDate: (string) timestamp task is due
  • description: (string) description of chat message, post, task, or space
  • assignees: (array) array of userids
    • _id: (string) unique identifier of user
  • data: (array) array of objects representing attached files
    • fileId: (string) fileKey from /files/getuploadurl
    • fileSize: (int) size of file in bytes
    • fileType: (string) file category: 'image', 'video', 'audio', or (default) 'document'
    • name: (string) file name
    • provider: (string) 'native'
    • providerFileType: (string) MIME type
    • thumbnailFile: (string) fileKey of thumbnail image. See here.
    • previewFile: (string) Deprecated
    • path: (string) URL to file
    • previewUrl: (string) Deprecated
    • thumbnailUrl: (string) URL to thumbnailFile
    • icon: (string) Not currently in use
    • keywords: (string) Not currently in use
    • description: (string) Not currently in use
    • pages: (string) Number of pages found in file. This is determined by the thumbnail conversion process
    • nextSchedule: (string) Timestamp thumbnail conversion will be retried
    • convertStart: (string) Timestamp thumbnail conversion started
    • convertStatus: (string) the status of the thumbnail conversion: 0 - not started, 1 - in progress, 2 - complete, 3 - failed, 4 - failed but retrying
    • convertFailed: (string) Error message for failed thumbnail conversion
    • metadata: (object)
      • stgeProvd: (string) storage provider: 'gcs' (google cloud storage)
      • prvwProvd: (string) preview provider: 'gcs' (google cloud storage)
      • paging: (int) Not currently in use.
  • settings: (object) space settings
    • confId: (string) media server unique identifier for space (topic)
    • mdOpts: (array) array of strings of media server options parameters
    • mdSrv: (string) media server type: 'ams'
  • type: (string) type of topic: 'group' or 'direct'. This property only exists in categories that involve changes to a space itself (e.g.: 'topic.updated', 'app.event.topic.new').
Object
chatCountNumber of messages in a post (idea) or task.int
likeCountNot used.int
createdTimestamp of when message item was created.string
modifiedTimestamp of when message item was last editted.string
sender
  • type: (string) what type of sender ('user' or 'anonymous')
  • _id: (String) unique identifier of sender
  • username: (string) username (email) of sender
  • displayname: (string) Name to display of sender
  • picture_url: (string) URL to display picture of sender
Object
parentMsgObject containing the data of the parent post or task.Object
statusThe archive status of the space: 0 = active, 1 = archived.integer
topicTypeType of topic: 'direct' or 'group'string
topicIdUnique identifier of topic to send message to. Note: Direct messages are sent to a topic with only 2 members. To retrieve the topicId for a direct message see /spaces/direct/{userType}/{userId}.string

Categories

NameDescription
chatA new chat message was sent
ideaA new post (idea) was created
taskA new task was created
topic.updatedSpace settings were changed (title, archive, etc.)
app.event.message.updatedA message was updated
app.event.task.updatedA task was updated
app.event.idea.updatedA post was updated
app.event.message.removedA chat, task, idea (post) was removed
app.event.topic.newThe current user has joined a new space (topic)

Authorization

Subscribed to channel.

Example

socketConnection.on('MESSAGE_SENT', callback(payload));

Payload Received ('chat')

{
  "category": "chat",
  "content": {
      "bodyText": "this is the message text",
      "data": [
        {
            "fileId": "9ec91803-9a64-4294-aaa0-a171bd57e300",
            "fileSize": 32553,
            "fileType": "image",
            "name": "sample-1.jpg",
            "provider": "native",
            "providerFileType": "image/jpeg",
            "thumbnailFile": "44e4e7ef-bae7-4605-b9df-485b880dd1b1"
        }
      ],
      "description": ""
  },
  "created": "2017-06-26T18:09:55.839Z",
  "modified": null,
  "sender": {
      "displayname": "John Smith",
      "picture_url": "https://storage.googleapis.com/onesnatesting/pictures/pfpic_johns_026498e4-e761-4acf-9a09-5b37ac7ed072",
      "type": "user",
      "username": "jsmith@fakeemail.com",
      "_id": "593989c06f0e166d93fab8a1"
  },
  "status": 0,
  "topicId": "594140a11d108619100a7361",
  "_id": "59514df3411b5c31ec9f0600"
}

Payload Received ('idea')

{
  "category":"idea",
  "topicId":"59399c9b31eadf0f747fbbe2",
  "modified":"2017-07-19T17:28:27.089Z",
  "_id":"596f96bb70289b7bab5ab707",
  "status":0,
  "content":{
      "bodyText":"test",
      "description":"testdescription",
      "status":"pending",
      "dueDate":"2017-07-19T17:28:27.126Z",
      "data":[
        {
            "provider":"native",
            "providerFileType":"image/jpeg",
            "fileType":"image",
            "name":"sample-1.jpg",
            "fileId":"d1798a7c-aa28-4894-a6c6-9ca99f61eee2",
            "icon":"",
            "thumbnail":"",
            "keywords":"",
            "description":"",
            "previewFile":"",
            "fileSize":32553,
            "thumbnailFile":"2eba55fd-b3a7-4034-ac9f-9fa793768db2",
            "metaData":{
              "stgeProvd":"gcs",
              "prvwProvd":"gcs",
              "paging":0
            },
            "pages":0,
            "nextSchedule":null,
            "convertStart":null,
            "convertStatus":0
        }
      ]
  },
  "created":"2017-07-19T17:28:27.089Z",
  "sender":{
      "displayname": "John Smith",
      "picture_url": "https://storage.googleapis.com/onesnatesting/pictures/pfpic_johns_026498e4-e761-4acf-9a09-5b37ac7ed072",
      "type": "user",
      "username": "jsmith@fakeemail.com",
      "_id": "593989c06f0e166d93fab8a1"
  }
}

Payload Received ('task')

{
  "category":"task",
  "topicId":"59399c9b31eadf0f747fbbe1",
  "modified":null,
  "_id":"596f96e770289b7bab5ab70a",
  "status":0,
  "content":{
      "bodyText":"task",
      "description":"task description",
      "dueDate":"2017-07-07T04:00:00.000Z",
      "status":"pending",
      "data":[
        {
            "provider":"native",
            "providerFileType":"image/jpeg",
            "fileType":"image",
            "name":"sample-1.jpg",
            "fileId":"3570f558-b653-4997-b746-80063176b071",
            "icon":"",
            "thumbnail":"",
            "keywords":"",
            "description":"",
            "previewFile":"",
            "fileSize":32553,
            "thumbnailFile":"4f8dadaa-d6c7-4475-acab-cf951c28fe3e",
            "metaData":{
              "stgeProvd":"gcs",
              "prvwProvd":"gcs",
              "paging":0
            },
            "pages":0,
            "nextSchedule":null,
            "convertStart":null,
            "convertStatus":0
        }
      ],
      "assignees":[
        {
            "_id":"593989c06f0e166d93fab8a1"
        }
      ]
  },
  "created":"2017-07-19T17:29:11.189Z",
  "sender":{
      "displayname": "John Smith",
      "picture_url": "https://storage.googleapis.com/onesnatesting/pictures/pfpic_johns_026498e4-e761-4acf-9a09-5b37ac7ed072",
      "type": "user",
      "username": "jsmith@fakeemail.com",
      "_id": "593989c06f0e166d93fab8a1"
  }
}

Payload Received ('topic.updated')

{
  "category":"topic.updated",
  "topicId":"59399c9b31eadf0f747fbbe1",
  "sender":{
      "type":"user",
      "_id":"593989c06f0e166d93fab8a1",
      "displayname":"John Smith"
  },
  "content":{
      "_id":"59399c9b31eadf0f747fbbe1",
      "cid":"593989c06f0e166d93fab8a1",
      "title":"test1234",
      "description":"",
      "status":1,
      "members":[
        {
            "member":"593989c06f0e166d93fab8a1",
            "memberType":"userId",
            "role":"admin",
            "joinTime":"2017-06-08T18:51:07.640Z",
            "username":"jsmith@fakeemail.com",
            "displayname":"John Smith",
            "picture_url":"pictures/pfpic_johns_026498e4-e761-4acf-9a09-5b37ac7ed072"
        }
      ],
      "settings":{
        "confId":"962724923",
        "mdOpts":[

        ],
        "mdSrv":"ams"
      },
      "created":"2017-06-08T18:51:07.643Z",
      "type":"group"
  }
}

Payload ('app.event.task.updated')

{
  "_id":"5972014f608d7917f1238951",
  "messageId":"5972014f608d7917f1238951",
  "topicId":"596ceea522910357ccc67151",
  "sender":{
      "displayname": "John Smith",
      "picture_url": "https://storage.googleapis.com/onesnatesting/pictures/pfpic_johns_026498e4-e761-4acf-9a09-5b37ac7ed071",
      "type": "user",
      "username": "jsmith@fakeemail.com",
      "_id": "593989c06f0e166d93fab8a1"
  },
  "content":{
      "status":"pending",
      "dueDate":"2017-07-14T04:00:00.000Z",
      "description":"test1",
      "bodyText":"test",
      "data":[
        {
            "thumbnailFile":"d8191ceb-e3cc-486c-b41e-18fb6ac55c51",
            "fileSize":32553,
            "previewFile":"",
            "description":"",
            "keywords":"",
            "thumbnail":"",
            "icon":"",
            "fileId":"0b513042-34c4-4f0a-8557-edf952649ed1",
            "name":"sample-1.jpg",
            "fileType":"image",
            "providerFileType":"image/jpeg",
            "provider":"native",
            "metaData":{
              "stgeProvd":"gcs",
              "prvwProvd":"gcs",
              "paging":0
            },
            "pages":0,
            "nextSchedule":null,
            "convertStart":null,
            "convertStatus":0
        }
      ],
      "assignees":[
        {
            "_id":"596505511678f723dfbf6561"
        }
      ]
  },
  "modified":"2017-07-21T14:26:37.028Z",
  "category":"app.event.task.updated"
}

Payload ('app.event.idea.updated')

{
  "_id":"5971ff7d608d7917f1238951",
  "messageId":"5971ff7d608d7917f1238951",
  "topicId":"596ceea522910357ccc67151",
  "sender":{
      "displayname": "John Smith",
      "picture_url": "https://storage.googleapis.com/onesnatesting/pictures/pfpic_johns_026498e4-e761-4acf-9a09-5b37ac7ed071",
      "type": "user",
      "username": "jsmith@fakeemail.com",
      "_id": "593989c06f0e166d93fab8a1"
  },
  "content":{
      "bodyText":"test",
      "description":"test12",
      "status":"pending",
      "dueDate":"2017-07-21T13:19:57.937Z",
      "data":[
        {
            "thumbnailFile":"88a4bc39-3b0b-48a1-9118-914e7c978921",
            "fileSize":32553,
            "previewFile":"",
            "description":"",
            "keywords":"",
            "thumbnail":"",
            "icon":"",
            "fileId":"02f33f88-9c05-4aae-86bc-b21377963551",
            "name":"sample-1.jpg",
            "fileType":"image",
            "providerFileType":"image/jpeg",
            "provider":"native",
            "metaData":{
              "stgeProvd":"gcs",
              "prvwProvd":"gcs",
              "paging":0
            },
            "pages":0,
            "nextSchedule":null,
            "convertStart":null,
            "convertStatus":0
        }
      ]
  },
  "modified":"2017-07-21T14:24:04.809Z",
  "category":"app.event.idea.updated"
}

Payload ('chat')

This is a comment inside a post

{
  "category":"chat",
  "topicId":"596ceea522910357ccc67151",
  "modified":null,
  "_id":"5971ffe2608d7917f1238951",
  "status":0,
  "content":{
      "bodyText":"comment1",
      "description":"",
      "data":[

      ]
  },
  "created":"2017-07-21T13:21:38.558Z",
  "sender":{
      "displayname": "John Smith",
      "picture_url": "https://storage.googleapis.com/onesnatesting/pictures/pfpic_johns_026498e4-e761-4acf-9a09-5b37ac7ed071",
      "type": "user",
      "username": "jsmith@fakeemail.com",
      "_id": "593989c06f0e166d93fab8a1"
  },
  "likeCount":0,
  "chatCount":0,
  "parentMsg":{
      "_id":"5971ff7d608d7917f1238951",
      "category":"idea",
      "topicId":"596ceea522910357ccc67151",
      "modified":"2017-07-21T13:19:57.901Z",
      "status":0,
      "content":{
        "bodyText":"test",
        "description":"test",
        "status":"pending",
        "dueDate":"2017-07-21T13:19:57.937Z",
        "data":[
            {
              "provider":"native",
              "providerFileType":"image/jpeg",
              "fileType":"image",
              "name":"sample-1.jpg",
              "fileId":"02f33f88-9c05-4aae-86bc-b21377963551",
              "icon":"",
              "thumbnail":"",
              "keywords":"",
              "description":"",
              "previewFile":"",
              "fileSize":32553,
              "thumbnailFile":"88a4bc39-3b0b-48a1-9118-914e7c978920",
              "metaData":{
                  "stgeProvd":"gcs",
                  "prvwProvd":"gcs",
                  "paging":0
              },
              "pages":0,
              "nextSchedule":null,
              "convertStart":null,
              "convertStatus":0,
              "path":"https://storage.googleapis.com/onesnatesting/logan%2F02f33f88-9c05-4aae-86bc-b21377913552?GoogleAccessId=logan-testing@onesnatesting.iam.gserviceaccount.com&Expires=1500643798&Signature=eRTPavxN%2Fn6gCKlM9cEF52izxpE45LAwN7HvlwJjYilgkbICqigtXl5SJ1Bt175N%2BRVR40LWc%2B7RYBzb3VgeOMyUKFlR%2FDKsCUtmqxIBackGrAbwXvla3HUdEPxKd7ewpiwl5s7UIGQF5KMV0h0HQLmI4vZb%2FCVUADw9EEMhLfIKMG02VPTk%2BqPZtEL5PUavAqsi0NSw7KYrgs1HyRsZ%2F7Alb%2FvoYQFqLrL7XsqosetBrFd8Xx8lDkxwbImZxe21Q8S%2BaRthAVPOpkasElxWitQXUnC%2B6ro9LL77gAkgba33JDFyoityCIpVA%2BCu6RY%2BPQ7m95tKPkupkd4j4DLynQ%3D%3D&response-content-disposition=attachment%3B%20filename%3D%22sample-1.jpg%22",
              "previewUrl":"https://storage.googleapis.com/onesnatesting/logan%2F88a4bc39-3b0b-48a1-9118-214e7c978921?GoogleAccessId=logan-testing@onesnatesting.iam.gserviceaccount.com&Expires=1500643798&Signature=kaJPL8OcbqGRF0%2BSZ32661NjZQbWHM9Ekc9dk%2FjhzC8V%2FmXrF2fM%2BpElhsiTBUW3RX58bWI0y8Ri%2FtdrBMOFV06LQZmuVzZFFULuJ398D0E7e%2Bqy7zRq6FH0EHMa4d3rpWgpnvXeePJ5ENrFizG46xRWA89WhK%2BaBElOTqiO8Af2hVcIrdrHjDEoy%2BAsfyTmIqBVpKPxp5zv4%2FdpniuGLs17y%2BvUXxg%2FktS58XSFom32S1LvsrCbiMdkHMiUmhaQI6PcnJDYb0llAImx9DiwHWTuAxlQ%2B4hB%2BGGJIcKoyHQ2R5EzFmXnqYcSc13c4aUJ4OltCCgPbyEHqzolQLipeg%3D%3D",
              "thumbnailUrl":"https://storage.googleapis.com/onesnatesting/logan%2F88a4bc39-3b0b-48a1-9118-114e7c978921?GoogleAccessId=logan-testing@onesnatesting.iam.gserviceaccount.com&Expires=1500643798&Signature=kaJPL8OcbqGRF0%2BSZ32661NjZQbWHM9Ekc9dk%2FjhzC8V%2FmXrF2fM%2BpElhsiTBUW3RX58bWI0y8Ri%2FtdrBMOFV06LQZmuVzZFFULuJ398D0E7e%2Bqy7zRq6FH0EHMa4d3rpWgpnvXeePJ5ENrFizG46xRWA89WhK%2BaBElOTqiO8Af2hVcIrdrHjDEoy%2BAsfyTmIqBVpKPxp5zv4%2FdpniuGLs17y%2BvUXxg%2FktS58XSFom32S1LvsrCbiMdkHMiUmhaQI6PcnJDYb0llAImx9DiwHWTuAxlQ%2B4hB%2BGGJIcKoyHQ2R5EzFmXnqYcSc13c4aUJ4OltCCgPbyEHqzolQLipeg%3D%3D"
            }
        ]
      },
      "created":"2017-07-21T13:19:57.901Z",
      "sender":{
        "displayname": "John Smith",
        "picture_url": "https://storage.googleapis.com/onesnatesting/pictures/pfpic_johns_026498e4-e761-4acf-9a09-5b37ac7ed071",
        "type": "user",
        "username": "jsmith@fakeemail.com",
        "_id": "593989c06f0e166d93fab8a1"
      },
      "likeCount":0,
      "chatCount":0
  },
  "topicType":"group",
  "topicTitle":"test dialin"
}

Payload ('app.event.message.removed')

{
  "_id":"5972014f608d7917f1238959",
  "messageId":"5972014f608d7917f1238959",
  "sender":{
      "displayname": "John Smith",
      "picture_url": "https://storage.googleapis.com/onesnatesting/pictures/pfpic_johns_026498e4-e761-4acf-9a09-5b37ac7ed071",
      "type": "user",
      "username": "jsmith@fakeemail.com",
      "_id": "593989c06f0e166d93fab8a1"
  },
  "content":{
      "status":"pending",
      "dueDate":"2017-07-14T04:00:00.000Z",
      "description":"test1",
      "bodyText":"test",
      "data":[
        {
            "thumbnailFile":"d8191ceb-e3cc-486c-b41e-18fb6ac55c51",
            "fileSize":32553,
            "previewFile":"",
            "description":"",
            "keywords":"",
            "thumbnail":"",
            "icon":"",
            "fileId":"0b513042-34c4-4f0a-8557-edf952649ed1",
            "name":"sample-1.jpg",
            "fileType":"image",
            "providerFileType":"image/jpeg",
            "provider":"native",
            "metaData":{
              "stgeProvd":"gcs",
              "prvwProvd":"gcs",
              "paging":0
            },
            "pages":0,
            "nextSchedule":null,
            "convertStart":null,
            "convertStatus":0
        }
      ],
      "assignees":[
        {
            "_id":"593989c06f0e166d93fab8a1"
        }
      ]
  },
  "topicId":"596ceea522910357ccc67151",
  "category":"app.event.message.removed"
}

Payload ('app.event.topic.new')

{
  "category":"app.event.topic.new",
  "content":{
      "cid":"593989c06f0e166d93fab8a1",
      "title":"test create 12",
      "description":"",
      "_id":"598b652d2a6d0422fa309101",
      "restrict":[

      ],
      "status":0,
      "members":[
        {
            "member":"593989c06f0e166d93fab8a1",
            "memberType":"userId",
            "role":"admin",
            "joinTime":"2017-06-08T18:51:07.640Z",
            "username":"jsmith@fakeemail.com",
            "displayname":"John Smith",
            "picture_url":"pictures/pfpic_johns_026498e4-e761-4acf-9a09-5b37ac7ed072"
        }
      ],
      "parents":[

      ],
      "settings":{
        "confId":"465024951",
        "mdOpts":[

        ],
        "mdSrv":"ams"
      },
      "created":"2017-08-09T19:40:29.775Z",
      "type":"group"
  },
  "sender":{
      "displayname": "John Smith",
      "type": "user",
      "_id": "593989c06f0e166d93fab8a1"
  }
}