Skip to content

Commit

Permalink
version 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
deleolajide committed Oct 6, 2020
1 parent 633b326 commit 7db4c43
Show file tree
Hide file tree
Showing 24 changed files with 122 additions and 88 deletions.
2 changes: 1 addition & 1 deletion config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.igniterealtime.openfire.ofmeet</groupId>
<artifactId>parent</artifactId>
<version>1.0.1-SNAPSHOT</version>
<version>1.0.1</version>
</parent>

<artifactId>config</artifactId>
Expand Down
6 changes: 6 additions & 0 deletions offocus/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ <h1>
Pade Focus Provider Plugin Changelog
</h1>

<p><b>1.0.1</b> -- <i>October 6, 2020</i></p>

<ul>
<li>Upgraded to latest Jitsi code</li>
</ul>

<p><b>1.0.0</b> -- <i>August 31, 2020</i></p>

<ul>
Expand Down
2 changes: 1 addition & 1 deletion offocus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.igniterealtime.openfire.ofmeet</groupId>
<artifactId>parent</artifactId>
<version>1.0.1-SNAPSHOT</version>
<version>1.0.1</version>
</parent>

<artifactId>offocus</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions ofgasi/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ <h1>
Pade SIP Gateway Changelog
</h1>

<p><b>1.0.1</b> -- <i>October 6, 2020</i></p>
<ul>
<li>No changes</li>
</ul>

<p><b>1.0.0</b> -- <i>August 31, 2020</i></p>

<ul>
Expand Down
2 changes: 1 addition & 1 deletion ofgasi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.igniterealtime.openfire.ofmeet</groupId>
<artifactId>parent</artifactId>
<version>1.0.1-SNAPSHOT</version>
<version>1.0.1</version>
</parent>

<artifactId>ofgasi</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ofmeet/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h1>
Pade VideoBridge Plugin Changelog
</h1>

<p><b>1.0.01</b> -- <i>September 30, 2020</i></p>
<p><b>1.0.1</b> -- <i>October 6, 2020</i></p>
<ul>
<li>Fixed <a href="https://github.com/igniterealtime/openfire-pade-plugin/issues/70">Issue #70 - Launching CryptPad failed</li>
</ul>
Expand Down
8 changes: 4 additions & 4 deletions ofmeet/classes/jitsi-meet/custom_ofmeet.js
Original file line number Diff line number Diff line change
Expand Up @@ -899,17 +899,17 @@ var ofmeet = (function(of)
}
else {
const largeVideo = document.querySelector("#largeVideo");
const iframe = largeVideo.cloneNode(false);
largeVideo.parentNode.appendChild(iframe);
largeVideo.style.display = "none";

iframe.requestFullscreen();
iframe.outerHTML = '<iframe src=' + url + ' id="ofmeet-content" style="width: 90%; height: 92%; border: 0;padding-left: 0px; padding-top: 0px;">'

const largeVideoElementsContainer = document.querySelector("#largeVideoElementsContainer");
largeVideoElementsContainer.style.visibility = "initial";
largeVideoElementsContainer.style.opacity = "1";

const iframe = largeVideo.cloneNode(false);
iframe.requestFullscreen();
iframe.outerHTML = '<iframe src=' + url + ' id="ofmeet-content" style="width: 90%; height: 92%; border: 0;padding-left: 0px; padding-top: 0px;">'

const cryptpad = document.querySelector('#ofmeet-content');

cryptpad.addEventListener("load", function (evt)
Expand Down
2 changes: 1 addition & 1 deletion ofmeet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>org.igniterealtime.openfire.ofmeet</groupId>
<artifactId>parent</artifactId>
<version>1.0.1-SNAPSHOT</version>
<version>1.0.1</version>
</parent>

<artifactId>ofmeet</artifactId>
Expand Down
4 changes: 3 additions & 1 deletion pade/classes/public/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@

<h1 id="changelog">Changelog</h1>

<p><b>1.6.10</b> -- <i>September 31, 2020</i></p>
<p><b>1.6.10</b> -- <i>September 30, 2020</i></p>
<ul>
<li>Added support for voice chats using the Openfire Ohun plugin</li>
<li><a href="https://github.com/igniterealtime/pade/issues/236">Fixed #236: User Directory in Padé Chat does not work</a></li>
<li><a href="https://github.com/igniterealtime/pade/issues/237">Fixed #237: Wordchat windows is not large enough to display full chart</a></li>
</ul>

<p><b>1.6.9</b> -- <i>August 31, 2020</i></p>
Expand Down
47 changes: 38 additions & 9 deletions pade/classes/public/inverse/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,31 @@ var padeapi = (function(api)
Backbone = converse.env.Backbone;
dayjs = converse.env.dayjs;

if (getSetting("useGitea", false))
{
Strophe.addConnectionPlugin('giteasasl',
{
init: function (connection)
{
Strophe.SASLGitea = function () { };
Strophe.SASLGitea.prototype = new Strophe.SASLMechanism("GITEA", true, 2000);

Strophe.SASLGitea.test = function (connection)
{
return getSetting("password", null) !== null;
};

Strophe.SASLGitea.prototype.onChallenge = function (connection)
{
return btoa(Strophe.getNodeFromJid(connection.jid) + ":" + connection.pass);
};

connection.mechanisms[Strophe.SASLGitea.prototype.name] = Strophe.SASLGitea;
console.log("Gitea SASL authentication enabled");
}
});
}

document.title = chrome.i18n.getMessage('manifest_shortExtensionName') + " Converse | " + this._converse.VERSION_NAME;

_converse.api.settings.update({
Expand Down Expand Up @@ -801,9 +826,13 @@ var padeapi = (function(api)
background.$iq = $iq;
background.$msg = $msg;
background.$pres = $pres;
background.pade.connection = _converse.connection;
background.setupUserPayment();
background.setupStreamDeck();

if (background.pade)
{
background.pade.connection = _converse.connection;
background.setupUserPayment();
background.setupStreamDeck();
}

const id = Strophe.getNodeFromJid(_converse.connection.jid);
const password = _converse.connection.pass;
Expand Down Expand Up @@ -1006,22 +1035,22 @@ var padeapi = (function(api)
{
init: function (connection)
{
Strophe.SASLOFChat = function () { };
Strophe.SASLOFChat.prototype = new Strophe.SASLMechanism("OFCHAT", true, 2000);
Strophe.SASLGitea = function () { };
Strophe.SASLGitea.prototype = new Strophe.SASLMechanism("OFCHAT", true, 2000);

Strophe.SASLOFChat.test = function (connection)
Strophe.SASLGitea.test = function (connection)
{
return getSetting("password", null) !== null;
};

Strophe.SASLOFChat.prototype.onChallenge = function (connection)
Strophe.SASLGitea.prototype.onChallenge = function (connection)
{
var token = getSetting("username", null) + ":" + getSetting("password", null);
console.debug("Strophe.SASLOFChat", token);
console.debug("Strophe.SASLGitea", token);
return token;
};

connection.mechanisms[Strophe.SASLOFChat.prototype.name] = Strophe.SASLOFChat;
connection.mechanisms[Strophe.SASLGitea.prototype.name] = Strophe.SASLGitea;
console.debug("strophe plugin: ofchatsasl enabled");
}
});
Expand Down
6 changes: 2 additions & 4 deletions pade/classes/public/inverse/plugins/canned.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,9 @@
if (!view.el.querySelector(".fa-sticky-note") && getSetting("showToolbarIcons", true))
{
var id = view.model.get("box_id");
padeapi.addToolbarItem(view, id, "pade-canned-" + id, '<a class="fas fa-sticky-note" title="Canned Responses/Replies"></a>');
var canned = padeapi.addToolbarItem(view, id, "pade-canned-" + id, '<a class="fas fa-sticky-note" title="Canned Responses/Replies"></a>');

var canned = document.getElementById("pade-canned-" + id);

if (canned) canned.addEventListener('click', function(evt)
canned.addEventListener('click', function(evt)
{
evt.stopPropagation(view, id);
doCannedMsg(view);
Expand Down
8 changes: 3 additions & 5 deletions pade/classes/public/inverse/plugins/directory.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,9 @@
if (!view.el.querySelector(".fa-male") && getSetting("showToolbarIcons", true))
{
var id = view.model.get("box_id");
padeapi.addToolbarItem(view, id, "pade-directory-" + id, '<a title="Search User Directory"><span class="fa fa-male"></span><span class="fa fa-female"></span></a>');
var directory = padeapi.addToolbarItem(view, id, "pade-directory-" + id, '<a title="Search User Directory"><span class="fa fa-male"></span><span class="fa fa-female"></span></a>');

var directory = document.getElementById("pade-directory-" + id);

if (directory) directory.addEventListener('click', function(evt)
directory.addEventListener('click', function(evt)
{
evt.stopPropagation();

Expand Down Expand Up @@ -165,7 +163,7 @@

function findUsers(search, callback)
{
if (bgWindow)
if (bgWindow && bgWindow.pade)
{
var url = "https://" + bgWindow.pade.server + "/rest/api/restapi/v1/meet/profile/" + search;
var options = {method: "GET", headers: {"authorization": "Basic " + btoa(bgWindow.pade.username + ":" + bgWindow.pade.password), "accept": "application/json"}};
Expand Down
25 changes: 0 additions & 25 deletions pade/classes/public/inverse/plugins/fastpath.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,6 @@
}
});

function newElement (el, id, html, className)
{
var ele = document.createElement(el);
if (id) ele.id = id;
if (html) ele.innerHTML = html;
if (className) ele.classList.add(className);
document.body.appendChild(ele);
return ele;
}

function padeapi.addToolbarItem (view, id, label, html)
{
let placeHolder = view.el.querySelector('#place-holder');

if (!placeHolder)
{
const toolbar = view.el.querySelector('.chat-toolbar');
toolbar.appendChild(newElement('li', 'place-holder'));
placeHolder = view.el.querySelector('#place-holder');
}
var newEle = newElement('li', label, html);
placeHolder.insertAdjacentElement('afterEnd', newEle);
return newEle;
}

function setupFastpath(callback)
{
_converse.connection.sendIQ(converse.env.$iq({type: 'get', to: "workgroup." + _converse.connection.domain}).c('workgroups', {jid: _converse.connection.jid, xmlns: "http://jabber.org/protocol/workgroup"}).tree(), function(resp)
Expand Down
7 changes: 2 additions & 5 deletions pade/classes/public/inverse/plugins/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,13 @@
{
var jid = view.model.get("jid");
var id = view.model.get("box_id");

padeapi.addToolbarItem(view, id, "pade-info-" + id, '<a class="fas fa-info" title="Information"></a>');

var occupants = view.el.querySelector('.occupants');

if (occupants)
{
var infoButton = document.getElementById("pade-info-" + id);
var infoButton = padeapi.addToolbarItem(view, id, "pade-info-" + id, '<a class="fas fa-info" title="Information"></a>');

if (infoButton) infoButton.addEventListener('click', function(evt)
infoButton.addEventListener('click', function(evt)
{
evt.stopPropagation();
toggleInfoBar(view, id, jid);
Expand Down
6 changes: 2 additions & 4 deletions pade/classes/public/inverse/plugins/invite.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,9 @@
if (view.model.get("type") === "chatroom" && inviteAvailable && !view.el.querySelector(".fa-user-plus") && getSetting("showToolbarIcons", true))
{
var id = view.model.get("box_id");
padeapi.addToolbarItem(view, id, "pade-invite-" + id, '<a class="fas fa-user-plus" title="Invite others to this chat with a saved invitation"></a>');
var invite = padeapi.addToolbarItem(view, id, "pade-invite-" + id, '<a class="fas fa-user-plus" title="Invite others to this chat with a saved invitation"></a>');

var invite = document.getElementById("pade-invite-" + id);

if (invite) invite.addEventListener('click', function(evt)
invite.addEventListener('click', function(evt)
{
evt.stopPropagation();

Expand Down
37 changes: 20 additions & 17 deletions pade/classes/public/inverse/plugins/ohun.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

for (let i=0; i<peers.length; i++)
{
ohun[peers[i]].peer.close();
ohun[peers[i]].localStream.getTracks().forEach(track => track.stop());
if (ohun[peers[i]].peer) ohun[peers[i]].peer.close();
if (ohun[peers[i]].localStream) ohun[peers[i]].localStream.getTracks().forEach(track => track.stop());
}
});

Expand Down Expand Up @@ -572,28 +572,31 @@

if (send) sendMessage('end', room);

if (ohun[room] && ohun[room].icons && ohun[room].localStream && ohun[room].peer)
if (ohun[room])
{
ohun[room].localStream.getTracks().forEach((track) => { track.stop() });
ohun[room].peer.close();
if (ohun[room].icons && ohun[room].localStream && ohun[room].peer)
{
ohun[room].localStream.getTracks().forEach((track) => { track.stop() });
ohun[room].peer.close();

const icons = Object.getOwnPropertyNames(ohun[room].icons)
const icons = Object.getOwnPropertyNames(ohun[room].icons)

for (let i=0; i<icons.length; i++)
{
ohun[room].icons[icons[i]].icon.style.display = "none";
for (let i=0; i<icons.length; i++)
{
ohun[room].icons[icons[i]].icon.style.display = "none";
}

updateOhunIcon(room, 'voice chat stopped', "#aaa", "off");
}

updateOhunIcon(room, 'voice chat stopped', "#aaa", "off");
}
if (ohun[room].recognitionActive && ohun[room].recognition)
{
ohun[room].recognition.stop();
ohun[room].recognitionActive = false;
}

if (ohun[room].recognitionActive && ohun[room].recognition)
{
ohun[room].recognition.stop();
ohun[room].recognitionActive = false;
ohun[room] = {};
}

ohun[room] = {};
}
}

Expand Down
2 changes: 1 addition & 1 deletion pade/classes/public/inverse/plugins/payments.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@

_converse.api.listen.on('renderToolbar', function(view)
{
if (bgWindow)
if (bgWindow && bgWindow.pade)
{
var id = view.model.get("box_id");
var jid = view.model.get("jid");
Expand Down
18 changes: 17 additions & 1 deletion pade/classes/public/inverse/plugins/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,23 @@

if (cloudData.length > 0)
{
this.el.querySelector("#pade-search-results").innerHTML = "";
const searchResults = this.el.querySelector("#pade-search-results");
searchResults.innerHTML = "";
searchResults.style.cursor = "pointer";

searchResults.addEventListener("click", function(evt)
{
searchResults.requestFullscreen();
searchResults.innerHTML = "";

makeWordCloud({
width: screen.availWidth - 50,
height: screen.availHeight - 50,
font: "Helvetica",
container: {element: this.el, selector: "#pade-search-results"},
words: processData(cloudData)
});
});

makeWordCloud({
width: 700,
Expand Down
4 changes: 2 additions & 2 deletions pade/classes/public/inverse/plugins/webmeet.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@
}
}

if (bgWindow.pade.ofmeetUrl)
if (bgWindow.pade && bgWindow.pade.ofmeetUrl)
{
html = '<a class="fas fa-video" title="Audio/Video/Screenshare Conference"></a>';
var handleJitsiMeet = padeapi.addToolbarItem(view, id, "webmeet-jitsi-meet-" + id, html);
Expand All @@ -578,7 +578,7 @@
}, false);
}

if (bgWindow.pade.chatAPIAvailable)
if (bgWindow.pade && bgWindow.pade.chatAPIAvailable)
{
const domain = Strophe.getDomainFromJid(jid);

Expand Down
Loading

0 comments on commit 7db4c43

Please sign in to comment.