view plugins/im.js @ 73:e4899c122d7b

Fix the comment about Strophe.js code.
author Sonny Piers <sonny.piers@gmail.com>
date Mon, 06 Feb 2012 16:53:22 +0100
parents f23e4741a7c5
children c06ec02217ee
line wrap: on
line source

'use strict';

/**
  Copyright (c) 2011, Sonny Piers <sonny at fastmail dot net>

  Permission to use, copy, modify, and/or distribute this software for any
  purpose with or without fee is hereby granted, provided that the above
  copyright notice and this permission notice appear in all copies.

  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

//////
//IM//
//////
Lightstring.plugins['message'] = {
  stanzas: {
    normalMessage: function(aTo, aSubject, aText) {
      return "<message type='normal' to='" + aTo + "'><subject>" + aSubject + "</subject><body>" + aText + "</body></message>";
    },
    chatMessage: function(aTo, aText) {
      return "<message type='chat' to='" + aTo + "'><body>" + aText + "</body></message>";
    }
  }
};