Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

connectycube

Package Overview
Dependencies
Maintainers
2
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connectycube - npm Package Compare versions

Comparing version 3.7.8 to 3.8.0

lib/.DS_Store

3

lib/cubeConfig.js

@@ -65,2 +65,3 @@ const config = {

conference: { server: 'wss://janus.connectycube.com:8989' },
whiteboard: { server: 'https://whiteboard.connectycube.com' },
urls: {

@@ -78,2 +79,4 @@ session: 'session',

addressbookRegistered: 'address_book/registered_users',
meetings: 'meetings',
whiteboards: 'whiteboards',
type: '.json'

@@ -80,0 +83,0 @@ },

@@ -47,2 +47,6 @@ const config = require('./cubeConfig')

const ConferenceClient = require('./videocalling_conference/cubeConferenceClient')
// meetings API
const Meeting = require('./cubeMeeting')
// witeboards API
const Whiteboard = require('./cubeWhiteboard')

@@ -52,2 +56,4 @@ this.videochat = new WebRTCClient(this.chat.xmppClient)

this.chat.webrtcSignalingProcessor = this.videochat.signalingProcessor
this.meeting = new Meeting(this.service)
this.whiteboard = new Whiteboard(this.service)
} else {

@@ -54,0 +60,0 @@ this.videochat = null

@@ -433,2 +433,74 @@ const Config = require('../cubeConfig'),

// params:
// - to (user id OR dialog id)
// - dialogId
// - body
// - originMessageId
// - last?
editMessage(params) {
const stanzaParams = {
from: this.helpers.getUserCurrentJid(),
to: this.helpers.jidOrUserId(params.to),
type: this.helpers.typeChat(params.to),
id: Utils.getBsonObjectId()
};
const messageStanza = ChatUtils.createMessageStanza(stanzaParams);
messageStanza
.c('body', {
xmlns: 'jabber:client'
})
.t(params.body)
.up();
messageStanza
.c('replace', {
xmlns: 'urn:xmpp:message-correct:0',
id: params.originMessageId,
last: params.last ? "true" : "false"
})
.up();
messageStanza
.c('extraParams', {
xmlns: 'jabber:client'
})
.c('dialog_id')
.t(params.dialogId);
this.xmppClient.send(messageStanza);
}
// params:
// - to (user id OR dialog id)
// - dialogId
// - messageId
deleteMessage(params) {
const stanzaParams = {
from: this.helpers.getUserCurrentJid(),
to: this.helpers.jidOrUserId(params.to),
type: this.helpers.typeChat(params.to),
id: Utils.getBsonObjectId()
};
const messageStanza = ChatUtils.createMessageStanza(stanzaParams);
messageStanza
.c('remove', {
xmlns: 'urn:xmpp:message-delete:0',
id: params.messageId
})
.up();
messageStanza
.c('extraParams', {
xmlns: 'jabber:client'
})
.c('dialog_id')
.t(params.dialogId);
this.xmppClient.send(messageStanza);
}
getLastUserActivity(jidOrUserId) {

@@ -544,2 +616,4 @@ return new Promise((resolve, reject) => {

read = ChatUtils.getElement(stanza, 'displayed'),
replaceSubElement = ChatUtils.getElement(stanza, 'replace'),
removeSubElement = ChatUtils.getElement(stanza, 'remove'),
composing = ChatUtils.getElement(stanza, 'composing'),

@@ -577,2 +651,3 @@ paused = ChatUtils.getElement(stanza, 'paused'),

// typing statuses
if (composing || paused) {

@@ -588,2 +663,24 @@ if (

// edit message
if (replaceSubElement) {
if (typeof this.onMessageUpdateListener === 'function') {
Utils.safeCallbackCall(this.onMessageUpdateListener,
ChatUtils.getAttr(replaceSubElement, 'id'),
ChatUtils.getAttr(replaceSubElement, 'last') === "true",
bodyContent,
dialogId,
userId);
}
return true;
}
// delete message
if (removeSubElement) {
if (typeof this.onMessageDeleteListener === 'function') {
Utils.safeCallbackCall(this.onMessageDeleteListener, ChatUtils.getAttr(removeSubElement, 'id'), dialogId, userId);
}
return true;
}
// delivered / read statuses
if (marker) {

@@ -590,0 +687,0 @@ if (delivered) {

2

lib/messaging/cubeChatInternalUtils.js

@@ -174,3 +174,3 @@ const Utils = require('../cubeInternalUtils'),

for (let c = 0, lenght = extraParams.children.length; c < lenght; c++) {
for (let c = 0, length = extraParams.children.length; c < length; c++) {
if (extraParams.children[c].name === 'attachment') {

@@ -177,0 +177,0 @@ attach = {};

@@ -94,3 +94,3 @@ const Config = require('../cubeConfig')

subscribeToPublic (id) {
subscribe (id) {
const ajaxParams = {

@@ -104,3 +104,3 @@ type: 'POST',

unsubscribeFromPublic (id) {
unsubscribe (id) {
const ajaxParams = {

@@ -115,2 +115,10 @@ type: 'DELETE',

subscribeToPublic (id) {
return this.subscribe(id)
}
unsubscribeFromPublic (id) {
return this.unsubscribe(id)
}
updateNotificationsSettings (id, enabled) {

@@ -117,0 +125,0 @@ const settings = {

{
"name": "connectycube",
"description": "ConnectyCube chat and video chat JavaScript SDK",
"version": "3.7.8",
"version": "3.8.0",
"homepage": "https://developers.connectycube.com/reactnative",

@@ -78,3 +78,3 @@ "main": "lib/cubeMain.js",

},
"gitHead": "1755411ec5a074eb22a02da3fca308b9d2a56618"
"gitHead": "902dd65bace828e790b82f387810c1e85c43d66d"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc