Skip to content
This repository was archived by the owner on Jan 14, 2026. It is now read-only.

Commit b36b5c8

Browse files
committed
version 1.6.10
1 parent eb05c0f commit b36b5c8

File tree

11 files changed

+23
-52
lines changed

11 files changed

+23
-52
lines changed

docs/changelog.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ <h1 id="changelog">Changelog</h1>
5151
<p><b>1.6.10</b> -- <i>September 30, 2020</i></p>
5252
<ul>
5353
<li>Added support for voice chats using the Openfire Ohun plugin</li>
54+
<li><a href="https://github.com/igniterealtime/pade/issues/236">Fixed #236: User Directory in Padé Chat does not work</a></li>
5455
<li><a href="https://github.com/igniterealtime/pade/issues/237">Fixed #237: Wordchat windows is not large enough to display full chart</a></li>
5556
</ul>
5657

docs/inverse/index.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ var padeapi = (function(api)
564564

565565
Strophe.SASLGitea.prototype.onChallenge = function (connection)
566566
{
567-
return getSetting("password");
567+
return btoa(Strophe.getNodeFromJid(connection.jid) + ":" + connection.pass);
568568
};
569569

570570
connection.mechanisms[Strophe.SASLGitea.prototype.name] = Strophe.SASLGitea;
@@ -826,9 +826,13 @@ var padeapi = (function(api)
826826
background.$iq = $iq;
827827
background.$msg = $msg;
828828
background.$pres = $pres;
829-
background.pade.connection = _converse.connection;
830-
background.setupUserPayment();
831-
background.setupStreamDeck();
829+
830+
if (background.pade)
831+
{
832+
background.pade.connection = _converse.connection;
833+
background.setupUserPayment();
834+
background.setupStreamDeck();
835+
}
832836

833837
const id = Strophe.getNodeFromJid(_converse.connection.jid);
834838
const password = _converse.connection.pass;

docs/inverse/plugins/canned.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,9 @@
108108
if (!view.el.querySelector(".fa-sticky-note") && getSetting("showToolbarIcons", true))
109109
{
110110
var id = view.model.get("box_id");
111-
padeapi.addToolbarItem(view, id, "pade-canned-" + id, '<a class="fas fa-sticky-note" title="Canned Responses/Replies"></a>');
111+
var canned = padeapi.addToolbarItem(view, id, "pade-canned-" + id, '<a class="fas fa-sticky-note" title="Canned Responses/Replies"></a>');
112112

113-
var canned = document.getElementById("pade-canned-" + id);
114-
115-
if (canned) canned.addEventListener('click', function(evt)
113+
canned.addEventListener('click', function(evt)
116114
{
117115
evt.stopPropagation(view, id);
118116
doCannedMsg(view);

docs/inverse/plugins/directory.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,9 @@
114114
if (!view.el.querySelector(".fa-male") && getSetting("showToolbarIcons", true))
115115
{
116116
var id = view.model.get("box_id");
117-
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>');
117+
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>');
118118

119-
var directory = document.getElementById("pade-directory-" + id);
120-
121-
if (directory) directory.addEventListener('click', function(evt)
119+
directory.addEventListener('click', function(evt)
122120
{
123121
evt.stopPropagation();
124122

@@ -165,7 +163,7 @@
165163

166164
function findUsers(search, callback)
167165
{
168-
if (bgWindow)
166+
if (bgWindow && bgWindow.pade)
169167
{
170168
var url = "https://" + bgWindow.pade.server + "/rest/api/restapi/v1/meet/profile/" + search;
171169
var options = {method: "GET", headers: {"authorization": "Basic " + btoa(bgWindow.pade.username + ":" + bgWindow.pade.password), "accept": "application/json"}};

docs/inverse/plugins/fastpath.js

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,6 @@
3939
}
4040
});
4141

42-
function newElement (el, id, html, className)
43-
{
44-
var ele = document.createElement(el);
45-
if (id) ele.id = id;
46-
if (html) ele.innerHTML = html;
47-
if (className) ele.classList.add(className);
48-
document.body.appendChild(ele);
49-
return ele;
50-
}
51-
52-
function padeapi.addToolbarItem (view, id, label, html)
53-
{
54-
let placeHolder = view.el.querySelector('#place-holder');
55-
56-
if (!placeHolder)
57-
{
58-
const toolbar = view.el.querySelector('.chat-toolbar');
59-
toolbar.appendChild(newElement('li', 'place-holder'));
60-
placeHolder = view.el.querySelector('#place-holder');
61-
}
62-
var newEle = newElement('li', label, html);
63-
placeHolder.insertAdjacentElement('afterEnd', newEle);
64-
return newEle;
65-
}
66-
6742
function setupFastpath(callback)
6843
{
6944
_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)

docs/inverse/plugins/info.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,13 @@
7979
{
8080
var jid = view.model.get("jid");
8181
var id = view.model.get("box_id");
82-
83-
padeapi.addToolbarItem(view, id, "pade-info-" + id, '<a class="fas fa-info" title="Information"></a>');
84-
8582
var occupants = view.el.querySelector('.occupants');
8683

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

91-
if (infoButton) infoButton.addEventListener('click', function(evt)
88+
infoButton.addEventListener('click', function(evt)
9289
{
9390
evt.stopPropagation();
9491
toggleInfoBar(view, id, jid);

docs/inverse/plugins/invite.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,9 @@
9090
if (view.model.get("type") === "chatroom" && inviteAvailable && !view.el.querySelector(".fa-user-plus") && getSetting("showToolbarIcons", true))
9191
{
9292
var id = view.model.get("box_id");
93-
padeapi.addToolbarItem(view, id, "pade-invite-" + id, '<a class="fas fa-user-plus" title="Invite others to this chat with a saved invitation"></a>');
93+
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>');
9494

95-
var invite = document.getElementById("pade-invite-" + id);
96-
97-
if (invite) invite.addEventListener('click', function(evt)
95+
invite.addEventListener('click', function(evt)
9896
{
9997
evt.stopPropagation();
10098

docs/inverse/plugins/ohun.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
for (let i=0; i<peers.length; i++)
1616
{
17-
ohun[peers[i]].peer.close();
18-
ohun[peers[i]].localStream.getTracks().forEach(track => track.stop());
17+
if (ohun[peers[i]].peer) ohun[peers[i]].peer.close();
18+
if (ohun[peers[i]].localStream) ohun[peers[i]].localStream.getTracks().forEach(track => track.stop());
1919
}
2020
});
2121

docs/inverse/plugins/payments.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787

8888
_converse.api.listen.on('renderToolbar', function(view)
8989
{
90-
if (bgWindow)
90+
if (bgWindow && bgWindow.pade)
9191
{
9292
var id = view.model.get("box_id");
9393
var jid = view.model.get("jid");

docs/inverse/plugins/webmeet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@
559559
}
560560
}
561561

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

581-
if (bgWindow.pade.chatAPIAvailable)
581+
if (bgWindow.pade && bgWindow.pade.chatAPIAvailable)
582582
{
583583
const domain = Strophe.getDomainFromJid(jid);
584584

0 commit comments

Comments
 (0)