Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions js/modules/qbChat.js
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,8 @@ DialogProxy.prototype = {
},

create: function(params, callback) {
if (params.occupants_ids instanceof Array) params.occupants_ids = params.occupants_ids.join(', ');

Utils.QBLog('[DialogProxy]', 'create', params);

this.service.ajax({url: Utils.getUrl(dialogUrl), type: 'POST', data: params}, callback);
Expand Down
4 changes: 3 additions & 1 deletion quickblox.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* QuickBlox JavaScript SDK - v1.14.0 - 2015-10-15 */
/* QuickBlox JavaScript SDK - v1.14.0 - 2015-10-16 */

(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.QB = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/*
Expand Down Expand Up @@ -1026,6 +1026,8 @@ DialogProxy.prototype = {
},

create: function(params, callback) {
if (params.occupants_ids instanceof Array) params.occupants_ids = params.occupants_ids.join(', ');

Utils.QBLog('[DialogProxy]', 'create', params);

this.service.ajax({url: Utils.getUrl(dialogUrl), type: 'POST', data: params}, callback);
Expand Down
4 changes: 2 additions & 2 deletions quickblox.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion samples/chat/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ <h5 class="col-md-12 col-sm-12 col-xs-12" id="all_occupants"></h5>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.4.1/jquery.timeago.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js" type="text/javascript"></script>

<script src="../../quickblox.min.js"></script>
<script src="../../quickblox.js"></script>
<script src="js/config.js"></script>
<script src="js/connection.js"></script>
<script src="js/messages.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions samples/chat/js/dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ function createNewDialog() {
}else{
dialogName = currentUser.login + ', ' + usersNames.join(', ');
}
dialogOccupants = usersIds.join(',');
dialogOccupants = usersIds;
dialogType = 2;
} else {
dialogOccupants = usersIds.join(',');
dialogOccupants = usersIds;
dialogType = 3;
}

Expand Down
12 changes: 6 additions & 6 deletions samples/webrtc/peer-to-peer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@
<body>
<div class="wrapper webrtcp2p">
<header class="header">
<div class="center">
<div class="center">
<h1 class="title">
<a href="http://quickblox.com/"><img class="logo" src="images/logo-quickblox.png" alt="QuickBlox Samples"></a>
JavaScript WebRTC Sample <small>(Peer-to-Peer)</small>
</h1>
</div>
</header>

<section class="info">
<p id="infoMessage" class="center">
Login as any user on this computer and another user on another computer
</p>
</section>

<section class="choose-user center">
<h3 class="light text-center">Choose a user to login with.</h3>
<div class="users-wrap caller">
Expand Down Expand Up @@ -73,11 +73,11 @@ <h3 class="light text-center">Choose a user to call</h3>
</button>
</div>
</section>

<div class="push"></div>

</div>

<footer class="footer">
<div class="center">
Source: <a href="https://github.com/QuickBlox/quickblox-javascript-sdk/tree/master/samples/webrtc/peer-to-peer">https://github.com/QuickBlox/quickblox-javascript-sdk/tree/master/samples/webrtc/peer-to-peer</a>
Expand Down Expand Up @@ -121,4 +121,4 @@ <h3 class="light text-center">Choose a user to call</h3>
<script src="config.js"></script>
<script src="main.js"></script>
</body>
</html>
</html>
16 changes: 8 additions & 8 deletions samples/webrtc/peer-to-peer/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ var mediaParams, caller, callee;
QB.init(QBApp.appId, QBApp.authKey, QBApp.authSecret, CONFIG);

$(document).ready(function() {

buildUsers('.users-wrap.caller');

// Choose user
//
$(document).on('click', '.choose-user button', function() {
Expand All @@ -14,12 +14,12 @@ $(document).ready(function() {
id: $(this).attr('id'),
full_name: $(this).attr('data-name'),
login: $(this).attr('data-login'),
password: $(this).attr('data-password')
password: $(this).attr('data-password')
};

chooseRecipient(caller.id);
});


// Choose recipient
//
Expand All @@ -31,7 +31,7 @@ $(document).ready(function() {
id: $(this).attr('id'),
full_name: $(this).attr('data-name'),
login: $(this).attr('data-login'),
password: $(this).attr('data-password')
password: $(this).attr('data-password')
};

$('#calleeName').text(callee.full_name);
Expand Down Expand Up @@ -188,13 +188,13 @@ QB.webrtc.onCallListener = function(userId, extension) {
};

$('.incoming-callType').text(extension.callType === 'video' ? 'Video' : 'Audio');

// save a callee
callee = {
id: extension.callerID,
full_name: "User with id " + extension.callerID,
login: "",
password: ""
password: ""
};

$('.caller').text(callee.full_name);
Expand Down Expand Up @@ -319,7 +319,7 @@ function buildUsers(el, excludeID) {
var userFullName = $('<div>').addClass('name').text(user.full_name).appendTo(userBtn);
userBtn.appendTo(el);
}
}
}
}

function updateInfoMessage(msg){
Expand Down