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
  • endTime: (string) returns the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC
  • mediaMode: (string) media mode of the meeting. Returns either 'audio' or 'video'
  • meetingStatus: (string) status of the meeting at the time of response. Returns either 'active' or 'inactive'
  • recordings: (array)
  • startTime: (string) an ISO time string, defining the time when the message was sent.
  • status: (string) completion status of task: 'pending', 'complete'
  • virtualEndTime: (string) goes hand in hand with 'endTime' - when they are both null, the meeting is fully active.
  • 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
    • previewUrl: (string) URL to file if it's of 'image' type
    • path: (string) URL to file
    • 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
messageIdAuthentic message IDstring
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
topicTitleTitle of the topicstring
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.)
topic.markreadReturned right after the user has been shown the latest message
app.event.message.updatedA message was updated
app.event.user.topic.preference.updatedSpace notifications were turned on, or it has been set as a favorite
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 ('topic.markread')

{
            "topicId":"5f06c25e574ca36b54cb4cdf",
            "category":"topic.markread",
            "content":{
               "messagesLastReadTime":"2020-07-16T11:24:34.902Z",
               "unreadMessagesCount":0
            }
         }

Payload Received ('app.event.user.topic.preference.updated')

{
            "category": "app.event.user.topic.preference.updated",
            "content": {
                "_id": "5f06c25e574ca36b54cb4cdf",
                "isPinned": true,
                "notification": true
            },
            "sender": {
                "_id": "5f04251caa4a347af9946e06",
                "type": "user"
            },
            "topicId": "5f06c25e574ca36b54cb4cdf"
        }

Payload Received ('chat')

{
    "_id": "5f103c8b76111fce5a460df8",
    "category": "chat",
    "chatCount": 0,
    "content": {
        "bodyText": "<p>asd</p>",
        "data": [
        ],
        "description": "",
        "endTime": null,
        "mediaMode": "audio",
        "meetingStatus": "active",
        "recordings": [
        ],
        "startTime": "2020-07-16T11:39:55.237Z",
        "virtualEndTime": null
    },
    "created": "2020-07-16T11:39:55.232Z",
    "likeCount": 0,
    "modified": "2020-07-16T11:39:55.232Z",
    "sender": {
        "_id": "5f04251caa4a347af9946e06",
        "displayname": "Test user",
        "picture_url": "https://accounts.zang.io/norevimages/noimage.jpg",
        "type": "user",
        "username": "testuser@avaya.com"
    },
    "status": 0,
    "topicId": "5f06c25e574ca36b54cb4cdf",
    "topicTitle": "aadasdasdasdasd",
    "topicType": "group"
}

Payload Received ('idea')

{
   "sender":{
      "_id":"5f04251caa4a347af9946e06",
      "username":"testuser@avaya.com",
      "displayname":"Test user",
      "picture_url":"https://accounts.zang.io/norevimages/noimage.jpg",
      "type":"user"
   },
   "content":{
      "endTime":null,
      "mediaMode":"audio",
      "virtualEndTime":null,
      "meetingStatus":"active",
      "bodyText":"<p>asdadasasdasd</p>",
      "data":[

      ],
      "description":"",
      "startTime":"2020-07-10T11:32:46.996Z",
      "recordings":[

      ]
   },
   "chatCount":0,
   "likeCount":0,
   "status":0,
   "_id":"5f0851de1015c7c2ba29fd2e",
   "category":"chat",
   "parentMsg":{
      "_id":"5f058047497958bd3862b9cf",
      "bodyText":"asdasdfasdf",
      "category":"idea"
   },
   "topicId":"5f047cbf1f2f363310b0cda0",
   "created":"2020-07-10T11:32:46.990Z",
   "modified":"2020-07-10T11:32:46.990Z",
   "topicType":"group",
   "topicTitle":"testspace"
}

Payload Received ('task')

{
    "category": "task",
    "chatMessages": {},
    "topicId": "5f0425254b3cd61ae416fa5f",
    "content": {
      "bodyText": "asdasd",
      "assignees": [
        {
          "_id": "5f04251caa4a347af9946e06"
        }
      ],
      "description": "<p>asdasdasd</p>",
      "data": [
        {
          "fileId": "63cb20f5-12d8-4dea-b784-ae13c11a1cb8",
          "fileSize": 2034,
          "fileType": "document",
          "icon": "",
          "name": "userActions compressed.txt",
          "provider": "native",
          "providerFileType": "text/plain"
        }
      ],
      "dueDate": "2020-07-10T11:06:59.733Z",
      "status": "pending"
    }
  }

Payload Received ('topic.updated')

{
    "category": "topic.updated",
    "content": {
        "__restrictProccessed": true,
        "_id": "5f047cbf1f2f363310b0cda0",
        "cid": "5f04251caa4a347af9946e06",
        "companies": [
            {
                "companyid": "5697db96283a4708c4f786f6",
                "userid": "5f04251caa4a347af9946e06"
            }
        ],
        "created": "2020-07-07T13:46:39.344Z",
        "members": [
            {
                "displayname": "Test user",
                "joinTime": "2020-07-07T13:46:39.339Z",
                "member": "5f04251caa4a347af9946e06",
                "memberType": "userId",
                "phone_numbers": [
                ],
                "picture_url": "https://accounts.zang.io/norevimages/noimage.jpg",
                "role": "admin",
                "username": "testuser@avaya.com"
            },
            {
                "displayname": "Vidas Andrijaitis",
                "joinTime": "2020-07-09T09:32:12.934Z",
                "member": "5ef9b678aa4a347af983c74c",
                "memberType": "userId",
                "phone_numbers": [
                ],
                "picture_url": "https://storage.googleapis.com/onesna/pictures/pfpic_andrijaitis.vidas_f5070921-da02-49b0-a398-69020e14f53b",
                "role": "member",
                "username": "andrijaitis.vidas@orioninc.com"
            }
        ],
        "modified": "2020-07-10T11:28:02.853Z",
        "msgRetention": {
            "notInheritParentPolicy": false,
            "policy": {
                "from": "company",
                "limitCustomLength": false,
                "retentionLength": 0,
                "retentionType": "forever"
            },
            "retentionLength": 0,
            "retentionType": "forever"
        },
        "parents": [
        ],
        "restrict": [
        ],
        "settings": {
            "allowPasswordInURL": false,
            "autoStart": false,
            "confId": "918529927",
            "confPin": "",
            "encryptedPassword": "",
            "hideAutoStartPrompt": false,
            "mdLic": [
                "video",
                "audio",
                "dialin",
                "recording",
                "large-meeting"
            ],
            "mdOpts": [
            ],
            "mdProviders": [
                "mpaas"
            ],
            "mdSrv": "mpaas",
            "memberOnly": false,
            "mpaasSettings": {
                "eventConference": {
                    "enable": false,
                    "endDate": null,
                    "hostingContinent": "EU",
                    "startDate": null
                },
                "maxResolution": "720P",
                "mixerMode": "OPTIMIZED_PROCESSED"
            },
            "passwordRequired": {
                "allGuests": true
            }
        },
        "status": 0,
        "title": "new space",
        "type": "group"
    },
    "sender": {
        "_id": "5f04251caa4a347af9946e06",
        "displayname": "Test user",
        "type": "user"
    },
    "topicId": "5f047cbf1f2f363310b0cda0"
}

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

{
    "_id": "5f084be01015c7ea0129f976",
    "category": "app.event.task.updated",
    "content": {
        "assignees": [
            {
                "_id": "5f04251caa4a347af9946e06"
            }
        ],
        "bodyText": "asdasd",
        "data": [
            {
                "convertStart": null,
                "convertStatus": 0,
                "description": "",
                "fileId": "63cb20f5-12d8-4dea-b784-ae13c11a1cb8",
                "fileSize": 2034,
                "fileType": "document",
                "icon": "",
                "keywords": [
                ],
                "metaData": {
                    "paging": 0,
                    "prvwProvd": "gcs",
                    "stgeProvd": "gcs"
                },
                "name": "userActions compressed.txt",
                "nextSchedule": null,
                "pages": 0,
                "path": "https://storage.googleapis.com/spaces2020/logan%2F63cb20f5-12d8-4dea-b784-ae13c11a1cb8?GoogleAccessId=spaces2020@spaces-2018.iam.gserviceaccount.com&Expires=1594386708&Signature=ly5ulK7nAIFWP66Ag%2BQnGGt0fji9gVJ8%2F29%2Bxio5WQwRMR5hGPoElen6XFqk%2FEulfPRKBgPwSeZdUrtvXdh09onuylay93%2F3D6qBUdwSDnUL8aJS0L7ZYjEfBNfp3nq6z40eeLDpoyChJS9CrXhlRNsfeE5HKXP15Uq0lNPhhqypfb7KQbexPq6Y3R0PL%2FsNqVWhcRZo8hFIAVpb%2FwgCy5W%2FemFt%2F%2BfUBXSktAY50MB9SDWMvy5HoZMlAD0fz7jjkerBnV7WOeEByu9%2FO%2F%2BGvaLX%2BGdl6b4iPLXLthG%2Bab%2FvlpjFvlM1c6Y9ppO3hRXYXOmgPmL1kAvuRpvumDis5g%3D%3D&response-content-disposition=attachment%3B%20filename%3D%22userActions%20compressed.txt%22",
                "previewFile": "",
                "provider": "native",
                "providerFileType": "text/plain",
                "recordingId": null,
                "thumbnail": "",
                "thumbnailFile": "",
                "type": null
            }
        ],
        "description": "<p>asdasdasdasdasasd</p>",
        "dueDate": "2020-07-10T11:06:59.733Z",
        "endTime": null,
        "mediaMode": "audio",
        "meetingStatus": "active",
        "recordings": [
        ],
        "startTime": "2020-07-10T11:07:12.284Z",
        "status": "pending",
        "virtualEndTime": null
    },
    "messageId": "5f084be01015c7ea0129f976",
    "modified": "2020-07-10T11:11:48.199Z",
    "sender": {
        "_id": "5f04251caa4a347af9946e06",
        "displayname": "Test user",
        "picture_url": "https://accounts.zang.io/norevimages/noimage.jpg",
        "type": "user",
        "username": "testuser@avaya.com"
    },
    "topicId": "5f0425254b3cd61ae416fa5f"
}

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

{
    "_id": "5f084a681015c7cc4929f8ca",
    "category": "app.event.idea.updated",
    "content": {
        "bodyText": "asdasasd",
        "data": [
            {
                "convertStart": null,
                "convertStatus": 0,
                "description": "",
                "fileId": "0c1591af-9d7a-4252-ba93-64e0b1ad49d4",
                "fileSize": 3235,
                "fileType": "document",
                "icon": "",
                "keywords": [
                ],
                "metaData": {
                    "paging": 0,
                    "prvwProvd": "gcs",
                    "stgeProvd": "gcs"
                },
                "name": "userActions working example.txt",
                "nextSchedule": null,
                "pages": 0,
                "path": "https://storage.googleapis.com/spaces2020/logan%2F0c1591af-9d7a-4252-ba93-64e0b1ad49d4?GoogleAccessId=spaces2020@spaces-2018.iam.gserviceaccount.com&Expires=1594387454&Signature=Mp%2BdLz4sPCDGedPpbiWWTYrI2HjvsxxeleeLlO07FtJsVqJLEAiQyD3m84WDP0vwSTzx7P2Sb336t1eq%2FF2VIkQSDPutXGsTs7pq4xUk789aY8%2BfoPFxVrVQ5Tv5lio6bs87YUTgvVzAp5VC2OFBTvCSptcJcRm2Fg7uwVYuBbtWwr0Ear5jastvpWvxNgpVtrPmVrGP00bONDtabRD9QyMsg3s7z7HPRZsNO6rFmIFyNjU13Yoe6G2P1bjg2kkpbRsS4XLqfdF6JfatyDqt1nYwaWfA9AzmgPA%2FdbOy7B5hM9RSWe72JhhCR1VctR8q%2BkaSSPArHdk3mdw30gEFtA%3D%3D&response-content-disposition=attachment%3B%20filename%3D%22userActions%20working%20example.txt%22",
                "previewFile": "",
                "provider": "native",
                "providerFileType": "text/plain",
                "recordingId": null,
                "thumbnail": "",
                "thumbnailFile": "",
                "type": null
            }
        ],
        "description": "<p>asdasdadsasdasdadasd</p>",
        "dueDate": "2020-07-10T11:00:56.755Z",
        "endTime": null,
        "mediaMode": "audio",
        "meetingStatus": "active",
        "recordings": [
        ],
        "startTime": "2020-07-10T11:00:56.757Z",
        "status": "pending",
        "virtualEndTime": null
    },
    "messageId": "5f084a681015c7cc4929f8ca",
    "modified": "2020-07-10T11:24:13.654Z",
    "sender": {
        "_id": "5f04251caa4a347af9946e06",
        "displayname": "Test user",
        "picture_url": "https://accounts.zang.io/norevimages/noimage.jpg",
        "type": "user",
        "username": "testuser@avaya.com"
    },
    "topicId": "5f0425254b3cd61ae416fa5f"
}

Payload ('chat')

This is a comment inside a post

{
   "sender":{
      "_id":"5f04251caa4a347af9946e06",
      "username":"testuser@avaya.com",
      "displayname":"Test user",
      "picture_url":"https://accounts.zang.io/norevimages/noimage.jpg",
      "type":"user"
   },
   "content":{
      "endTime":null,
      "mediaMode":"audio",
      "virtualEndTime":null,
      "meetingStatus":"active",
      "bodyText":"<p>asdasdasdasd</p>
<p><br></p>
<p><br></p>",
      "data":[

      ],
      "description":"",
      "startTime":"2020-07-16T13:15:01.099Z",
      "recordings":[

      ]
   },
   "chatCount":0,
   "likeCount":0,
   "status":0,
   "_id":"5f1052d5d37431bc3fa8ce43",
   "category":"chat",
   "parentMsg":{
      "_id":"5f1052c2d374313d0ca8ce3a",
      "bodyText":"asdasd",
      "category":"idea"
   },
   "topicId":"5f1051f0f3ed772f915e19ed",
   "created":"2020-07-16T13:15:01.089Z",
   "modified":"2020-07-16T13:15:01.089Z",
   "topicType":"group",
   "topicTitle":"asdasd"
}

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

{
    "_id": "5f0848181015c73ae229f735",
    "category": "app.event.message.removed",
    "content": {
        "bodyText": "<p>sdasdasdasd</p>",
        "data": [
        ],
        "description": "",
        "endTime": null,
        "mediaMode": "audio",
        "meetingStatus": "active",
        "recordings": [
        ],
        "startTime": "2020-07-10T10:51:04.626Z",
        "virtualEndTime": null
    },
    "created": "2020-07-10T10:51:04.613Z",
    "messageId": "5f0848181015c73ae229f735",
    "sender": {
        "_id": "5f04251caa4a347af9946e06",
        "displayname": "Test user",
        "picture_url": "https://accounts.zang.io/norevimages/noimage.jpg",
        "type": "user",
        "username": "testuser@avaya.com"
    },
    "topicId": "5f0425254b3cd61ae416fa5f"
}

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

{
   "_id":{
      "settings":{
         "mpaasSettings":{
            "eventConference":{
               "enable":false
            },
            "mixerMode":"OPTIMIZED_PROCESSED",
            "maxResolution":"720P"
         },
         "mdSrv":"mpaas",
         "mdOpts":[

         ],
         "confId":"476932391",
         "allowPasswordInURL":false,
         "mdProviders":[
            "mpaas"
         ],
         "mdLic":[
            "video",
            "audio",
            "dialin",
            "recording",
            "large-meeting"
         ],
         "autoStart":false,
         "hideAutoStartPrompt":false,
         "passwordRequired":{
            "allGuests":true
         }
      },
      "type":"group",
      "status":0,
      "restrict":[
         "deny_guest_access_history_msg"
      ],
      "_id":"5f1051f0f3ed772f915e19ed",
      "cid":"5f04251caa4a347af9946e06",
      "members":[
         {
            "phone_numbers":[

            ],
            "member":"5f04251caa4a347af9946e06",
            "memberType":"userId",
            "role":"admin",
            "joinTime":"2020-07-16T13:11:12.252Z",
            "username":"testuser@avaya.com",
            "displayname":"Test user",
            "picture_url":"https://accounts.zang.io/norevimages/noimage.jpg"
         }
      ],
      "title":"asdasd",
      "created":"2020-07-16T13:11:12.255Z",
      "parents":[

      ],
      "companies":[

      ],
      "msgRetention":{
         "notInheritParentPolicy":false,
         "retentionType":"delete_after_days",
         "retentionLength":730,
         "policy":{
            "from":"system",
            "retentionType":"delete_after_days",
            "retentionLength":730,
            "limitCustomLength":false
         }
      },
      "lastAccess":"2020-07-16T13:11:12.252Z",
      "role":"admin",
      "unreadMessagesCount":0,
      "unread":false,
      "__restrictProccessed":true,
      "lastMessageId":null,
      "lastMessage":null
   },
   "category":"app.event.topic.new",
   "content":{
      "settings":{
         "mpaasSettings":{
            "eventConference":{
               "enable":false
            },
            "mixerMode":"OPTIMIZED_PROCESSED",
            "maxResolution":"720P"
         },
         "mdSrv":"mpaas",
         "mdOpts":[

         ],
         "confId":"476932391",
         "allowPasswordInURL":false,
         "mdProviders":[
            "mpaas"
         ],
         "mdLic":[
            "video",
            "audio",
            "dialin",
            "recording",
            "large-meeting"
         ],
         "autoStart":false,
         "hideAutoStartPrompt":false,
         "passwordRequired":{
            "allGuests":true
         }
      },
      "type":"group",
      "status":0,
      "restrict":[
         "deny_guest_access_history_msg"
      ],
      "_id":"5f1051f0f3ed772f915e19ed",
      "cid":"5f04251caa4a347af9946e06",
      "members":[
         {
            "phone_numbers":[

            ],
            "member":"5f04251caa4a347af9946e06",
            "memberType":"userId",
            "role":"admin",
            "joinTime":"2020-07-16T13:11:12.252Z",
            "username":"testuser@avaya.com",
            "displayname":"Test user",
            "picture_url":"https://accounts.zang.io/norevimages/noimage.jpg"
         }
      ],
      "title":"asdasd",
      "created":"2020-07-16T13:11:12.255Z",
      "parents":[

      ],
      "companies":[

      ],
      "msgRetention":{
         "notInheritParentPolicy":false,
         "retentionType":"delete_after_days",
         "retentionLength":730,
         "policy":{
            "from":"system",
            "retentionType":"delete_after_days",
            "retentionLength":730,
            "limitCustomLength":false
         }
      },
      "lastAccess":"2020-07-16T13:11:12.252Z",
      "role":"admin",
      "unreadMessagesCount":0,
      "unread":false,
      "__restrictProccessed":true,
      "lastMessageId":null,
      "lastMessage":null
   },
   "sender":{
      "_id":"5f04251caa4a347af9946e06",
      "type":"user",
      "displayname":"Test user"
   }
}