Skip to content

Instantly share code, notes, and snippets.

@ndarilek
Created May 28, 2009 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ndarilek/119464 to your computer and use it in GitHub Desktop.
Save ndarilek/119464 to your computer and use it in GitHub Desktop.
D, [2009-05-28T12:43:21.585216 #1607] DEBUG -- :
------------------------------
D, [2009-05-28T12:43:21.585576 #1607] DEBUG -- : << <presence type='subscribe' to='utterance.localhost' from='nolan@localhost' id='9821' xmlns='jabber:client'><nick xmlns='http://jabber.org/protocol/nick'>nolan</nick><x xmlns='vcard-temp:x:update'></x><c ver='c9YhHDC8qrp1wOzPTQHysAgnAeY=' hash='sha-1' node='http://gajim.org' xmlns='http://jabber.org/protocol/caps'></c><status>I would like to add you to my contact list.</status></presence>
D, [2009-05-28T12:43:21.585849 #1607] DEBUG -- : PARSING: (<presence type='subscribe' to='utterance.localhost' from='nolan@localhost' id='9821' xmlns='jabber:client'><nick xmlns='http://jabber.org/protocol/nick'>nolan</nick><x xmlns='vcard-temp:x:update'></x><c ver='c9YhHDC8qrp1wOzPTQHysAgnAeY=' hash='sha-1' node='http://gajim.org' xmlns='http://jabber.org/protocol/caps'></c><status>I would like to add you to my contact list.</status></presence>)
D, [2009-05-28T12:43:21.586358 #1607] DEBUG -- : START ELEM: ({:ns=>{nil=>"jabber:client"}, :elem=>"presence", :uri=>"jabber:client", :attrs=>{"from"=>"nolan@localhost", "id"=>"9821", "to"=>"utterance.localhost", "type"=>"subscribe"}, :prefix=>nil})
D, [2009-05-28T12:43:21.586921 #1607] DEBUG -- : START ELEM: ({:ns=>{nil=>"http://jabber.org/protocol/nick"}, :elem=>"nick", :uri=>"http://jabber.org/protocol/nick", :attrs=>{}, :prefix=>nil})
D, [2009-05-28T12:43:21.587305 #1607] DEBUG -- : CHARS: nolan
D, [2009-05-28T12:43:21.587629 #1607] DEBUG -- : END ELEM: {:elem=>"nick", :uri=>"http://jabber.org/protocol/nick", :prefix=>nil}
D, [2009-05-28T12:43:21.587948 #1607] DEBUG -- : START ELEM: ({:ns=>{nil=>"vcard-temp:x:update"}, :elem=>"x", :uri=>"vcard-temp:x:update", :attrs=>{}, :prefix=>nil})
D, [2009-05-28T12:43:21.588300 #1607] DEBUG -- : END ELEM: {:elem=>"x", :uri=>"vcard-temp:x:update", :prefix=>nil}
D, [2009-05-28T12:43:21.588761 #1607] DEBUG -- : START ELEM: ({:ns=>{nil=>"http://jabber.org/protocol/caps"}, :elem=>"c", :uri=>"http://jabber.org/protocol/caps", :attrs=>{"node"=>"http://gajim.org", "hash"=>"sha-1", "ver"=>"c9YhHDC8qrp1wOzPTQHysAgnAeY="}, :prefix=>nil})
D, [2009-05-28T12:43:21.589176 #1607] DEBUG -- : END ELEM: {:elem=>"c", :uri=>"http://jabber.org/protocol/caps", :prefix=>nil}
D, [2009-05-28T12:43:21.589447 #1607] DEBUG -- : START ELEM: ({:ns=>{}, :elem=>"status", :uri=>"jabber:client", :attrs=>{}, :prefix=>nil})
D, [2009-05-28T12:43:21.589753 #1607] DEBUG -- : CHARS: I would like to add you to my contact list.
D, [2009-05-28T12:43:21.590002 #1607] DEBUG -- : END ELEM: {:elem=>"status", :uri=>"jabber:client", :prefix=>nil}
D, [2009-05-28T12:43:21.590236 #1607] DEBUG -- : END ELEM: {:elem=>"presence", :uri=>"jabber:client", :prefix=>nil}
D, [2009-05-28T12:43:21.590529 #1607] DEBUG -- : RECEIVING (presence) <presence xmlns="jabber:client" from="nolan@localhost" id="9821" to="utterance.localhost" type="subscribe">
<nick xmlns="http://jabber.org/protocol/nick">nolan</nick>
<x xmlns="vcard-temp:x:update"/>
<c xmlns="http://jabber.org/protocol/caps" node="http://gajim.org" hash="sha-1" ver="c9YhHDC8qrp1wOzPTQHysAgnAeY="/>
<status>I would like to add you to my contact list.</status>
</presence>
/home/nolan/Projects/Utterance/lib/utterance/controller.rb:23
write(presence.approve!)
(rdb:1) irb
irb(Utterance::Controller):001:0> presence
=> <presence id="9821" to="utterance.localhost" from="nolan@localhost" type="subscribe"/>
irb(Utterance::Controller):002:0> presence.approve!
=> <presence id="9821" to="nolan@localhost" type="subscribed"/>
irb(Utterance::Controller):003:0> Utterance.connection.write(presence)
D, [2009-05-28T12:44:05.877878 #1607] DEBUG -- : SENDING: ((irb):3:in `call') <presence id="9821" to="nolan@localhost" type="subscribed" from="utterance.localhost"/>
=> 87
irb(Utterance::Controller):004:0> presence
=> <presence id="9821" to="nolan@localhost" type="subscribed" from="utterance.localhost"/>
irb(Utterance::Controller):005:0> presence.request!
=> <presence id="9821" to="utterance.localhost" type="subscribe"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment