JSDoc: Class: Message

# Class: Message

## jsxc. Message

#### new Message(uid)

  Load message object with given uid.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `uid` | string | Unified identifier from message object

  Source:
    - jsxc.lib.Message.js, line 1

### Members

#### <static, constant> IN :string

  ##### Type:

  - string
  Default Value:
    - "in"
  Source:
    - jsxc.lib.Message.js, line 247

#### <static, constant> OUT :string

  ##### Type:

  - string
  Default Value:
    - "out"
  Source:
    - jsxc.lib.Message.js, line 254

#### <static, constant> SYS :string

  ##### Type:

  - string
  Default Value:
    - "sys"
  Source:
    - jsxc.lib.Message.js, line 261

### Methods

#### <static> delete(uid)

  Remove message with uid.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `uid` | string | message uid

  Source:
    - jsxc.lib.Message.js, line 206

#### <static> getDOM(uid) → {jQuery}

  Returns message object as jquery object.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `uid` | string | message uid

  Source:
    - jsxc.lib.Message.js, line 232

  ##### Returns:

  jQuery representation in DOM
  Type
    jQuery

#### delete()

  Remove object from storage.
  Source:
    - jsxc.lib.Message.js, line 163

#### getDOM() → {jQuery}

  Returns object as jquery object.
  Source:
    - jsxc.lib.Message.js, line 173

  ##### Returns:

  Representation in DOM
  Type
    jQuery

#### isReceived() → {boolean}

  Returns true if the message was already received.
  Source:
    - jsxc.lib.Message.js, line 195

  ##### Returns:

  true means received
  Type
    boolean

#### load(uid)

  Load message properties.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `uid` | string |

  Source:
    - jsxc.lib.Message.js, line 64

#### received()

  Mark message as received.
  Source:
    - jsxc.lib.Message.js, line 182

#### save() → {Message}

  Save message properties and create thumbnail.
  Source:
    - jsxc.lib.Message.js, line 80

  ##### Returns:

  this object
  Type
    Message

## jsxc. Message

#### new Message(args)

  Create new message object.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `args` | object | New message properties ###### Properties
  Name | Type | Description
  --- | --- | ---
  `bid` | string |
  `direction` | direction |
  `msg` | string |
  `encrypted` | boolean |
  `forwarded` | boolean |
  `sender` | boolean |
  `stamp` | integer |
  `attachment` | object | Attached data ###### Properties
  Name | Type | Description
  --- | --- | ---
  `name` | string | File name
  `size` | string | File size
  `type` | string | File type
  `data` | string | File data

  Source:
    - jsxc.lib.Message.js, line 2

### Members

#### <static, constant> IN :string

  ##### Type:

  - string
  Default Value:
    - "in"
  Source:
    - jsxc.lib.Message.js, line 247

#### <static, constant> OUT :string

  ##### Type:

  - string
  Default Value:
    - "out"
  Source:
    - jsxc.lib.Message.js, line 254

#### <static, constant> SYS :string

  ##### Type:

  - string
  Default Value:
    - "sys"
  Source:
    - jsxc.lib.Message.js, line 261

### Methods

#### <static> delete(uid)

  Remove message with uid.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `uid` | string | message uid

  Source:
    - jsxc.lib.Message.js, line 206

#### <static> getDOM(uid) → {jQuery}

  Returns message object as jquery object.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `uid` | string | message uid

  Source:
    - jsxc.lib.Message.js, line 232

  ##### Returns:

  jQuery representation in DOM
  Type
    jQuery

#### delete()

  Remove object from storage.
  Source:
    - jsxc.lib.Message.js, line 163

#### getDOM() → {jQuery}

  Returns object as jquery object.
  Source:
    - jsxc.lib.Message.js, line 173

  ##### Returns:

  Representation in DOM
  Type
    jQuery

#### isReceived() → {boolean}

  Returns true if the message was already received.
  Source:
    - jsxc.lib.Message.js, line 195

  ##### Returns:

  true means received
  Type
    boolean

#### load(uid)

  Load message properties.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `uid` | string |

  Source:
    - jsxc.lib.Message.js, line 64

#### received()

  Mark message as received.
  Source:
    - jsxc.lib.Message.js, line 182

#### save() → {Message}

  Save message properties and create thumbnail.
  Source:
    - jsxc.lib.Message.js, line 80

  ##### Returns:

  this object
  Type
    Message