Skip to content

Instantly share code, notes, and snippets.

View soulfly's full-sized avatar

Mr. software craftsman soulfly

View GitHub Profile
QBUser participant = new QBUser(2);
QBPrivateChatManager manager = QBChatService.getInstance().getPrivateChatManager();
manager.addChatListener(new QBChatManagerListener() {
@Override
public void chatCreated(QBChat chat) {
}
<iq id="inroom-cr92_test_room_test@muc.chat.quickblox.com" to="92_test_room_test@muc.chat.quickblox.com" type="set"><query xmlns="http://jabber.org/protocol/muc#owner"><x xmlns="jabber:x:data" type="submit"><field var="muc#roomconfig_roomname"><value>Test Room Test</value></field><field var="muc#roomconfig_persistentroom"><value>1</value></field></x></query></iq
<iq type="get" to="92_test_room_test@muc.chat.quickblox.com" id="561004347" from="298-92@chat.quickblox.com"><query xmlns="http://jabber.org/protocol/disco#info"></query></iq>
<iq xmlns="jabber:client" id="561004347" from="92_test_room_test@muc.chat.quickblox.com" to="298-92@chat.quickblox.com" type="result"><query xmlns="http://jabber.org/protocol/disco#info"><identity name="Test Room Test" category="conference" type="text"></identity><feature var="http://jabber.org/protocol/muc"></feature><feature var="muc_semianonymous"></feature><feature var="muc_unmoderated"></feature><feature var="muc_open"></feature><feature var="muc_persistent"></feature><feature var="muc_public"></feature><feature var="muc_unsecured"></feature></query></iq>
@soulfly
soulfly / Chat MUC xmpp4r: add affilations
Created June 2, 2014 08:15
Chat MUC xmpp4r: add affilations
require 'xmpp4r/client'
require 'xmpp4r/muc'
puts "1"
client = Jabber::Client.new(Jabber::JID::new("2960-6@chatstage.quickblox.com"))
client.connect
puts "2"
client.auth("emmaemma")
@soulfly
soulfly / Swift singleton implementation
Last active August 29, 2015 14:02
Swift singleton implementation
var myInstance:ChatService?
class ChatService {
class func instance() -> ChatService{
if !myInstance {
myInstance = ChatService()
println("init")
}
2014-07-08 12:20:42.417 Snippets[19144:1303] -[QBChat xmppStream:didSendIQ:] -> IQ: <iq type="get" to="muc.chat.quickblox.com" id="5610027"><query xmlns="http://jabber.org/protocol/disco#items"></query></iq>
2014-07-08 12:20:46.384 Snippets[19144:1303] -[QBChat xmppStream:didReceiveIQ:] -> <iq xmlns="jabber:client" from="muc.chat.quickblox.com" to="1273387-11477@chat.quickblox.com/89DD494C-5D34-4590-9F9A-A08E817E0056" type="result" id="5610027"><query xmlns="http://jabber.org/protocol/disco#items"><item name="prod_2rrvthnzxz_2rrvtho2gh" jid="11477_prod_2rrvthnzxz_2rrvtho2gh@muc.chat.quickblox.com"></item><item name="prod_2rrvthnz5c_2rrvtho2b5" jid="11477_prod_2rrvthnz5c_2rrvtho2b5@muc.chat.quickblox.com"></item><item name="prod_2rrvthnzn2_2rrvtho11s" jid="11477_prod_2rrvthnzn2_2rrvtho11s@muc.chat.quickblox.com"></item><item name="prod_2rrvtho1xq_2rrvtho24l" jid="11477_prod_2rrvtho1xq_2rrvtho24l@muc.chat.quickblox.com"></item><item name="prod_2rrvtho2mv_2rrvtho47d" jid="11477_prod_2rrvtho2mv_2rrvtho47d@muc.cha
ReplicaSetStatus{name=null, cluster=ClusterDescription{type=ReplicaSet, connectionMode=Multiple,
all=[ServerDescription{address=qb-mongo01-prod:27017, type=Unknown, hosts=[], passives=[], arbiters=[], primary='null', maxDocumentSize=16777216, maxMessageSize=33554432, maxWriteBatchSize=512, tags={}, setName='null', setVersion='null', averagePingTimeNanos=0, ok=false, state=Connecting, version=ServerVersion{versionList=[0, 0, 0]}, minWireVersion=0, maxWireVersion=0},
ServerDescription{address=qb-mongo02-prod:27017, type=Unknown, hosts=[], passives=[], arbiters=[], primary='null', maxDocumentSize=16777216, maxMessageSize=33554432, maxWriteBatchSize=512, tags={}, setName='null', setVersion='null', averagePingTimeNanos=0, ok=false, state=Connecting, version=ServerVersion{versionList=[0, 0, 0]}, minWireVersion=0, maxWireVersion=0}]}}
@soulfly
soulfly / gist:f9a124375fa9f33fff25
Created January 19, 2015 08:24
Q-municate Web issue
FB init Object
370094db.build.js:8 User d
370094db.build.js:15 App init s
370094db.build.js:9 FB status response Object
370094db.build.js:6 setting headers on request to https://api.quickblox.com/session.json
370094db.build.js:15 QB SDK: Session is created Object
370094db.build.js:5 [QBChat]: Status.CONNECTING
370094db.build.js:5 [QBChat]: Chat Protocol - BOSH
370094db.build.js:6 [QBChat RECV]: <stream:features xmlns=​"jabber:​client">​…​</stream:features>​
370094db.build.js:6 [QBChat SENT]: <auth xmlns=​"urn:​ietf:​params:​xml:​ns:​xmpp-sasl" mechanism=​"PLAIN">​…​</auth>​
@soulfly
soulfly / 4
Created February 3, 2015 12:34
4
-(void)completedWithResult:(Result *)result context:(void *)contextInfo
{
NSMutableDictionary *dict = (__bridge NSMutableDictionary *)contextInfo;
ChatMessage *message = dict[@"message"];
QBUUser *user = [[DataManager shared] currentUser];
self.isProcessing = NO;