]> cgit.babelmonkeys.de Git - socialXMPP.git/commitdiff
Small message changes/fixes and consistency change
authorFlorian Zeitz <florob@babelmonkeys.de>
Thu, 7 May 2009 18:21:39 +0000 (20:21 +0200)
committerFlorian Zeitz <florob@babelmonkeys.de>
Sat, 20 Jun 2009 19:41:06 +0000 (21:41 +0200)
css/standard.css
scripts/basic.js
scripts/classes.js

index 1792f53c2166572d35a5d50d642d04791e67c1ab..25e4aed4655e08610134e3628777510e9f50c8fd 100644 (file)
 .sender {
   color: blue;
 }
+
+.chat {
+  width: 30%;
+  height: 30%;
+  padding: 1em;
+  border: 2px solid;
+}
index a4b4a186717282899f116943ca279dd01739a530..1ef91154cde0c8947ce8b8640079757c41b66870 100644 (file)
@@ -158,7 +158,7 @@ function _cbRoster(e) {
        addFriend(entries[item].getAttribute('jid'), nick);
     }
     connection.addHandler(_cbPEP, NS_PEP, 'message');
-    var initialPresence = $pres().c('c', {xmlns: NS_CAPS, hash: 'sha-1', node: 'http://jabber.babelmonkeys.de', ver: genCaps()}).up();
+    var initialPresence = $pres().c('show').t('online').up().c('status').t('Hy, I am an socialXMPP instance').up().c('priority').t('0').up().c('c', {xmlns: NS_CAPS, hash: 'sha-1', node: 'http://jabber.babelmonkeys.de', ver: genCaps()}).up();
     connection.send(initialPresence.tree());
 
     return false;
@@ -191,6 +191,8 @@ function _cbDisco(e) {
 }
 
 function _cbMessage(msg) {
+    if ($(msg).attr('type') != 'chat')
+       return;
     var jid = $(msg).attr('from');
     var id = jid2id($(msg).attr('from')) + 'Chat';
     var body = $(msg).find('body:first').text();
index 8ada8d8838b14da3da51faed1f57e14ad7518b4e..c991a8af77d0d89cd16364508e8eea226daa5db3 100644 (file)
@@ -11,7 +11,7 @@ Tune = function() {
 Buddy = function(name, jid) {
     this.name = name;
     this.jid = jid;
-    this.vCard = "";
+    this.vCard = '';
     this.tune = new Tune();
 };