Class: 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:

Members

(static, constant) IN :string

Type:
  • string
Default Value:
  • in
Source:

(static, constant) OUT :string

Type:
  • string
Default Value:
  • out
Source:

(static, constant) SYS :string

Type:
  • string
Default Value:
  • sys
Source:

_received :boolean

Type:
  • boolean
Source:

_uid :string

Type:
  • string
Source:

encrypted :boolean

Type:
  • boolean
Source:

forwarded :boolean

Type:
  • boolean
Source:

stamp :integer

Type:
  • integer
Source:

Methods

(static) delete(uid)

Remove message with uid.
Parameters:
Name Type Description
uid string message uid
Source:

(static) getDOM(uid) → {jQuery}

Returns message object as jquery object.
Parameters:
Name Type Description
uid string message uid
Source:
Returns:
jQuery representation in DOM
Type
jQuery

delete()

Remove object from storage.
Source:

getDOM() → {jQuery}

Returns object as jquery object.
Source:
Returns:
Representation in DOM
Type
jQuery

isReceived() → {boolean}

Returns true if the message was already received.
Source:
Returns:
true means received
Type
boolean

load(uid)

Load message properties.
Parameters:
Name Type Description
uid string
Source:

received()

Mark message as received.
Source:

save() → {Message}

Save message properties and create thumbnail.
Source:
Returns:
this object
Type
Message

jsxc.Message

new Message(uid)

Load message object with given uid.
Parameters:
Name Type Description
uid string Unified identifier from message object
Source:

Members

(static, constant) IN :string

Type:
  • string
Default Value:
  • in
Source:

(static, constant) OUT :string

Type:
  • string
Default Value:
  • out
Source:

(static, constant) SYS :string

Type:
  • string
Default Value:
  • sys
Source:

_received :boolean

Type:
  • boolean
Source:

_uid :string

Type:
  • string
Source:

encrypted :boolean

Type:
  • boolean
Source:

forwarded :boolean

Type:
  • boolean
Source:

stamp :integer

Type:
  • integer
Source:

Methods

(static) delete(uid)

Remove message with uid.
Parameters:
Name Type Description
uid string message uid
Source:

(static) getDOM(uid) → {jQuery}

Returns message object as jquery object.
Parameters:
Name Type Description
uid string message uid
Source:
Returns:
jQuery representation in DOM
Type
jQuery

delete()

Remove object from storage.
Source:

getDOM() → {jQuery}

Returns object as jquery object.
Source:
Returns:
Representation in DOM
Type
jQuery

isReceived() → {boolean}

Returns true if the message was already received.
Source:
Returns:
true means received
Type
boolean

load(uid)

Load message properties.
Parameters:
Name Type Description
uid string
Source:

received()

Mark message as received.
Source:

save() → {Message}

Save message properties and create thumbnail.
Source:
Returns:
this object
Type
Message