Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
bf4b3efa
Commit
bf4b3efa
authored
May 18, 2020
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import _converse and api
parent
9813d43f
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
78 additions
and
170 deletions
+78
-170
src/converse-bookmark-views.js
src/converse-bookmark-views.js
+1
-3
src/converse-chatboxviews.js
src/converse-chatboxviews.js
+4
-6
src/converse-chatview.js
src/converse-chatview.js
+6
-9
src/converse-controlbox.js
src/converse-controlbox.js
+4
-7
src/converse-dragresize.js
src/converse-dragresize.js
+1
-4
src/converse-emoji-views.js
src/converse-emoji-views.js
+2
-5
src/converse-headlines-view.js
src/converse-headlines-view.js
+3
-6
src/converse-message-view.js
src/converse-message-view.js
+5
-8
src/converse-minimize.js
src/converse-minimize.js
+4
-6
src/converse-notification.js
src/converse-notification.js
+2
-5
src/converse-omemo.js
src/converse-omemo.js
+6
-20
src/converse-profile.js
src/converse-profile.js
+3
-5
src/converse-push.js
src/converse-push.js
+1
-4
src/converse-register.js
src/converse-register.js
+1
-4
src/converse-roomslist.js
src/converse-roomslist.js
+1
-3
src/converse-rosterview.js
src/converse-rosterview.js
+7
-9
src/headless/converse-bookmarks.js
src/headless/converse-bookmarks.js
+2
-4
src/headless/converse-bosh.js
src/headless/converse-bosh.js
+1
-4
src/headless/converse-chat.js
src/headless/converse-chat.js
+4
-6
src/headless/converse-chatboxes.js
src/headless/converse-chatboxes.js
+1
-3
src/headless/converse-disco.js
src/headless/converse-disco.js
+4
-6
src/headless/converse-emoji.js
src/headless/converse-emoji.js
+1
-3
src/headless/converse-headlines.js
src/headless/converse-headlines.js
+1
-3
src/headless/converse-mam.js
src/headless/converse-mam.js
+1
-5
src/headless/converse-muc.js
src/headless/converse-muc.js
+1
-3
src/headless/converse-ping.js
src/headless/converse-ping.js
+1
-4
src/headless/converse-pubsub.js
src/headless/converse-pubsub.js
+1
-7
src/headless/converse-roster.js
src/headless/converse-roster.js
+1
-3
src/headless/converse-smacks.js
src/headless/converse-smacks.js
+1
-3
src/headless/converse-status.js
src/headless/converse-status.js
+1
-3
src/headless/converse-vcard.js
src/headless/converse-vcard.js
+3
-6
src/modals/muc-commands.js
src/modals/muc-commands.js
+3
-3
No files found.
src/converse-bookmark-views.js
View file @
bf4b3efa
...
...
@@ -5,7 +5,7 @@
* @license Mozilla Public License (MPLv2)
*/
import
"
@converse/headless/converse-muc
"
;
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
import
tpl_bookmarks_list
from
"
templates/bookmarks_list.js
"
import
tpl_muc_bookmark_form
from
"
templates/muc_bookmark_form.js
"
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
...
...
@@ -35,8 +35,6 @@ converse.plugins.add('converse-bookmark-views', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
// Configuration values for this plugin
// ====================================
...
...
src/converse-chatboxviews.js
View file @
bf4b3efa
...
...
@@ -4,13 +4,13 @@
* @license Mozilla Public License (MPLv2)
*/
import
"
@converse/headless/converse-chatboxes
"
;
import
{
Overview
}
from
"
skeletor.js/src/overview
"
;
import
{
View
}
from
"
skeletor.js/src/view
"
;
import
{
result
}
from
"
lodash
"
;
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
tpl_avatar
from
"
templates/avatar.svg
"
;
import
tpl_background_logo
from
"
templates/background_logo.html
"
;
import
tpl_chatboxes
from
"
templates/chatboxes.html
"
;
import
{
Overview
}
from
"
skeletor.js/src/overview
"
;
import
{
View
}
from
"
skeletor.js/src/view
"
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
result
}
from
"
lodash
"
;
const
u
=
converse
.
env
.
utils
;
...
...
@@ -47,8 +47,6 @@ converse.plugins.add('converse-chatboxviews', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
api
.
promises
.
add
([
'
chatBoxViewsInitialized
'
]);
...
...
src/converse-chatview.js
View file @
bf4b3efa
...
...
@@ -6,11 +6,6 @@
import
"
converse-chatboxviews
"
;
import
"
converse-message-view
"
;
import
"
converse-modal
"
;
import
{
BootstrapModal
}
from
"
./converse-modal.js
"
;
import
{
Overview
}
from
"
skeletor.js/src/overview
"
;
import
{
debounce
,
isString
}
from
"
lodash
"
;
import
{
html
,
render
}
from
"
lit-html
"
;
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
log
from
"
@converse/headless/log
"
;
import
tpl_chatbox
from
"
templates/chatbox.js
"
;
import
tpl_chatbox_head
from
"
templates/chatbox_head.js
"
;
...
...
@@ -24,6 +19,12 @@ import tpl_toolbar from "templates/toolbar.html";
import
tpl_toolbar_fileupload
from
"
templates/toolbar_fileupload.html
"
;
import
tpl_user_details_modal
from
"
templates/user_details_modal.js
"
;
import
xss
from
"
xss/dist/xss
"
;
import
{
BootstrapModal
}
from
"
./converse-modal.js
"
;
import
{
Overview
}
from
"
skeletor.js/src/overview
"
;
import
{
__
}
from
'
@converse/headless/i18n
'
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
debounce
,
isString
}
from
"
lodash
"
;
import
{
html
,
render
}
from
"
lit-html
"
;
const
{
Strophe
,
sizzle
,
dayjs
}
=
converse
.
env
;
...
...
@@ -53,10 +54,6 @@ converse.plugins.add('converse-chatview', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
const
{
__
}
=
_converse
;
api
.
settings
.
update
({
'
auto_focus
'
:
true
,
'
message_limit
'
:
0
,
...
...
src/converse-controlbox.js
View file @
bf4b3efa
...
...
@@ -4,15 +4,16 @@
* @license Mozilla Public License (MPLv2)
*/
import
"
converse-chatview
"
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
{
View
}
from
"
skeletor.js/src/view
"
;
import
bootstrap
from
"
bootstrap.native
"
;
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
log
from
"
@converse/headless/log
"
;
import
tpl_brand_heading
from
"
templates/converse_brand_heading.html
"
;
import
tpl_controlbox
from
"
templates/controlbox.html
"
;
import
tpl_controlbox_toggle
from
"
templates/controlbox_toggle.html
"
;
import
tpl_login_panel
from
"
templates/login_panel.js
"
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
{
View
}
from
"
skeletor.js/src/view
"
;
import
{
__
}
from
'
@converse/headless/i18n
'
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
const
{
Strophe
,
dayjs
}
=
converse
.
env
;
const
u
=
converse
.
env
.
utils
;
...
...
@@ -98,10 +99,6 @@ converse.plugins.add('converse-controlbox', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
const
{
__
}
=
_converse
;
api
.
settings
.
update
({
allow_logout
:
true
,
default_domain
:
undefined
,
...
...
src/converse-dragresize.js
View file @
bf4b3efa
...
...
@@ -6,7 +6,7 @@
import
"
converse-chatview
"
;
import
"
converse-controlbox
"
;
import
{
debounce
}
from
"
lodash
"
;
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
import
tpl_dragresize
from
"
templates/dragresize.html
"
;
const
u
=
converse
.
env
.
utils
;
...
...
@@ -133,9 +133,6 @@ converse.plugins.add('converse-dragresize', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
api
.
settings
.
update
({
'
allow_dragresize
'
:
true
,
});
...
...
src/converse-emoji-views.js
View file @
bf4b3efa
...
...
@@ -10,7 +10,8 @@ import emoji_picker from "templates/emoji_picker.js";
import
sizzle
from
'
sizzle
'
;
import
tpl_emoji_button
from
"
templates/emoji_button.html
"
;
import
{
View
}
from
"
skeletor.js/src/view
"
;
import
{
converse
}
from
'
@converse/headless/converse-core
'
;
import
{
__
}
from
'
@converse/headless/i18n
'
;
import
{
_converse
,
api
,
converse
}
from
'
@converse/headless/converse-core
'
;
import
{
debounce
,
find
}
from
"
lodash
"
;
const
u
=
converse
.
env
.
utils
;
...
...
@@ -68,10 +69,6 @@ converse.plugins.add('converse-emoji-views', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
const
{
__
}
=
_converse
;
api
.
settings
.
update
({
'
use_system_emojis
'
:
true
,
'
visible_toolbar_buttons
'
:
{
...
...
src/converse-headlines-view.js
View file @
bf4b3efa
...
...
@@ -4,12 +4,12 @@
* @license Mozilla Public License (MPLv2)
*/
import
"
converse-chatview
"
;
import
tpl_chatbox
from
"
templates/chatbox.js
"
;
import
tpl_headline_panel
from
"
templates/headline_panel.js
"
;
import
{
View
}
from
'
skeletor.js/src/view.js
'
;
import
{
__
}
from
'
@converse/headless/i18n
'
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
render
}
from
"
lit-html
"
;
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
tpl_chatbox
from
"
templates/chatbox.js
"
;
import
tpl_headline_panel
from
"
templates/headline_panel.js
"
;
const
u
=
converse
.
env
.
utils
;
...
...
@@ -47,9 +47,6 @@ converse.plugins.add('converse-headlines-view', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
const
viewWithHeadlinesPanel
=
{
renderHeadlinesPanel
()
{
...
...
src/converse-message-view.js
View file @
bf4b3efa
...
...
@@ -6,10 +6,6 @@
import
"
./utils/html
"
;
import
"
@converse/headless/converse-emoji
"
;
import
URI
from
"
urijs
"
;
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
BootstrapModal
}
from
"
./converse-modal.js
"
;
import
{
debounce
}
from
'
lodash
'
import
{
render
}
from
"
lit-html
"
;
import
filesize
from
"
filesize
"
;
import
log
from
"
@converse/headless/log
"
;
import
tpl_file_progress
from
"
templates/file_progress.html
"
;
...
...
@@ -18,6 +14,11 @@ import tpl_message from "templates/message.html";
import
tpl_message_versions_modal
from
"
templates/message_versions_modal.js
"
;
import
tpl_spinner
from
"
templates/spinner.html
"
;
import
xss
from
"
xss/dist/xss
"
;
import
{
BootstrapModal
}
from
"
./converse-modal.js
"
;
import
{
__
}
from
'
@converse/headless/i18n
'
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
debounce
}
from
'
lodash
'
import
{
render
}
from
"
lit-html
"
;
const
{
Strophe
,
dayjs
}
=
converse
.
env
;
const
u
=
converse
.
env
.
utils
;
...
...
@@ -31,10 +32,6 @@ converse.plugins.add('converse-message-view', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
const
{
__
}
=
_converse
;
function
onTagFoundDuringXSSFilter
(
tag
,
html
,
options
)
{
/* This function gets called by the XSS library whenever it finds
...
...
src/converse-minimize.js
View file @
bf4b3efa
...
...
@@ -4,15 +4,15 @@
* @license Mozilla Public License (MPLv2)
*/
import
"
converse-chatview
"
;
import
tpl_chats_panel
from
"
templates/chats_panel.html
"
;
import
tpl_toggle_chats
from
"
templates/toggle_chats.html
"
;
import
tpl_trimmed_chat
from
"
templates/trimmed_chat.html
"
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
{
Overview
}
from
"
skeletor.js/src/overview
"
;
import
{
View
}
from
"
skeletor.js/src/view
"
;
import
{
__
}
from
'
@converse/headless/i18n
'
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
debounce
,
sum
}
from
'
lodash
'
;
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
tpl_chats_panel
from
"
templates/chats_panel.html
"
;
import
tpl_toggle_chats
from
"
templates/toggle_chats.html
"
;
import
tpl_trimmed_chat
from
"
templates/trimmed_chat.html
"
;
const
{
dayjs
}
=
converse
.
env
;
const
u
=
converse
.
env
.
utils
;
...
...
@@ -113,8 +113,6 @@ converse.plugins.add('converse-minimize', {
/* The initialize function gets called as soon as the plugin is
* loaded by Converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
api
.
settings
.
update
({
'
no_trimming
'
:
false
});
...
...
src/converse-notification.js
View file @
bf4b3efa
...
...
@@ -3,9 +3,10 @@
* @copyright 2020, the Converse.js contributors
* @license Mozilla Public License (MPLv2)
*/
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
log
from
"
@converse/headless/log
"
;
import
st
from
"
@converse/headless/utils/stanza
"
;
import
{
__
}
from
'
@converse/headless/i18n
'
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
const
{
Strophe
,
sizzle
}
=
converse
.
env
;
const
u
=
converse
.
env
.
utils
;
...
...
@@ -19,10 +20,6 @@ converse.plugins.add('converse-notification', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
__
}
=
_converse
;
const
{
api
}
=
_converse
;
_converse
.
supports_html5_notification
=
"
Notification
"
in
window
;
api
.
settings
.
update
({
...
...
src/converse-omemo.js
View file @
bf4b3efa
...
...
@@ -6,12 +6,13 @@
/* global libsignal */
import
"
converse-profile
"
;
import
log
from
"
@converse/headless/log
"
;
import
tpl_toolbar_omemo
from
"
templates/toolbar_omemo.html
"
;
import
{
Collection
}
from
"
skeletor.js/src/collection
"
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
{
__
}
from
'
@converse/headless/i18n
'
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
concat
,
debounce
,
difference
,
invokeMap
,
range
,
omit
}
from
"
lodash
"
;
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
log
from
"
@converse/headless/log
"
;
import
tpl_toolbar_omemo
from
"
templates/toolbar_omemo.html
"
;
const
{
Strophe
,
sizzle
,
$build
,
$iq
,
$msg
}
=
converse
.
env
;
const
u
=
converse
.
env
.
utils
;
...
...
@@ -81,7 +82,6 @@ converse.plugins.add('converse-omemo', {
},
initialize
()
{
const
{
_converse
}
=
this
.
__super__
;
this
.
debouncedRender
=
debounce
(
this
.
render
,
50
);
this
.
devicelist
=
_converse
.
devicelists
.
get
(
_converse
.
bare_jid
);
this
.
listenTo
(
this
.
devicelist
.
devices
,
'
change:bundle
'
,
this
.
debouncedRender
);
...
...
@@ -93,8 +93,7 @@ converse.plugins.add('converse-omemo', {
},
beforeRender
()
{
const
{
_converse
}
=
this
.
__super__
,
device_id
=
_converse
.
omemo_store
.
get
(
'
device_id
'
);
const
device_id
=
_converse
.
omemo_store
.
get
(
'
device_id
'
);
if
(
device_id
)
{
this
.
current_device
=
this
.
devicelist
.
devices
.
get
(
device_id
);
...
...
@@ -121,8 +120,6 @@ converse.plugins.add('converse-omemo', {
this
.
devicelist
.
removeOwnDevices
(
device_ids
)
.
then
(
this
.
modal
.
hide
)
.
catch
(
err
=>
{
const
{
_converse
}
=
this
.
__super__
,
{
__
}
=
_converse
;
log
.
error
(
err
);
_converse
.
api
.
alert
(
Strophe
.
LogLevel
.
ERROR
,
...
...
@@ -132,8 +129,6 @@ converse.plugins.add('converse-omemo', {
},
generateOMEMODeviceBundle
(
ev
)
{
const
{
_converse
}
=
this
.
__super__
,
{
__
,
api
}
=
_converse
;
ev
.
preventDefault
();
if
(
confirm
(
__
(
"
Are you sure you want to generate new OMEMO keys?
"
+
...
...
@@ -150,7 +145,6 @@ converse.plugins.add('converse-omemo', {
},
initialize
()
{
const
{
_converse
}
=
this
.
__super__
;
const
jid
=
this
.
model
.
get
(
'
jid
'
);
this
.
devicelist
=
_converse
.
devicelists
.
getDeviceList
(
jid
);
this
.
listenTo
(
this
.
devicelist
.
devices
,
'
change:bundle
'
,
this
.
render
);
...
...
@@ -171,7 +165,6 @@ converse.plugins.add('converse-omemo', {
ChatBox
:
{
async
sendMessage
(
text
,
spoiler_hint
)
{
if
(
this
.
get
(
'
omemo_active
'
)
&&
text
)
{
const
{
_converse
}
=
this
.
__super__
;
const
attrs
=
this
.
getOutgoingMessageAttributes
(
text
,
spoiler_hint
);
attrs
[
'
is_encrypted
'
]
=
true
;
attrs
[
'
plaintext
'
]
=
attrs
.
message
;
...
...
@@ -228,13 +221,8 @@ converse.plugins.add('converse-omemo', {
/* The initialize function gets called as soon as the plugin is
* loaded by Converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
__
}
=
_converse
;
const
{
api
}
=
_converse
;
api
.
settings
.
update
({
'
omemo_default
'
:
false
,
});
api
.
settings
.
update
({
'
omemo_default
'
:
false
});
api
.
promises
.
add
([
'
OMEMOInitialized
'
]);
...
...
@@ -296,7 +284,6 @@ converse.plugins.add('converse-omemo', {
reportDecryptionError
(
e
)
{
if
(
api
.
settings
.
get
(
"
loglevel
"
)
===
'
debug
'
)
{
const
{
__
}
=
_converse
;
this
.
createMessage
({
'
message
'
:
__
(
"
Sorry, could not decrypt a received OMEMO message due to an error.
"
)
+
`
${
e
.
name
}
${
e
.
message
}
`
,
'
type
'
:
'
error
'
,
...
...
@@ -590,7 +577,6 @@ converse.plugins.add('converse-omemo', {
}
_converse
.
createOMEMOMessageStanza
=
function
(
chatbox
,
message
,
devices
)
{
const
{
__
}
=
_converse
;
const
body
=
__
(
"
This is an OMEMO encrypted message which your client doesn’t seem to support.
"
+
"
Find more information on https://conversations.im/omemo
"
);
...
...
src/converse-profile.js
View file @
bf4b3efa
...
...
@@ -6,15 +6,16 @@
import
"
@converse/headless/converse-status
"
;
import
"
@converse/headless/converse-vcard
"
;
import
"
converse-modal
"
;
import
{
BootstrapModal
}
from
"
./converse-modal.js
"
;
import
UserSettingsModal
from
"
modals/user-settings
"
;
import
bootstrap
from
"
bootstrap.native
"
;
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
log
from
"
@converse/headless/log
"
;
import
sizzle
from
'
sizzle
'
;
import
tpl_chat_status_modal
from
"
templates/chat_status_modal
"
;
import
tpl_profile
from
"
templates/profile.js
"
;
import
tpl_profile_modal
from
"
templates/profile_modal
"
;
import
{
BootstrapModal
}
from
"
./converse-modal.js
"
;
import
{
__
}
from
'
@converse/headless/i18n
'
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
const
u
=
converse
.
env
.
utils
;
...
...
@@ -27,9 +28,6 @@ converse.plugins.add('converse-profile', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
const
{
__
}
=
_converse
;
api
.
settings
.
update
({
'
allow_adhoc_commands
'
:
true
,
...
...
src/converse-push.js
View file @
bf4b3efa
...
...
@@ -6,7 +6,7 @@
* @copyright 2020, the Converse.js contributors
* @license Mozilla Public License (MPLv2)
*/
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
filter
,
reject
}
from
'
lodash
'
;
import
log
from
"
@converse/headless/log
"
;
...
...
@@ -21,9 +21,6 @@ converse.plugins.add('converse-push', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
api
.
settings
.
update
({
'
push_app_servers
'
:
[],
'
enable_muc_push
'
:
false
...
...
src/converse-register.js
View file @
bf4b3efa
...
...
@@ -10,7 +10,7 @@ import "converse-controlbox";
import
{
__
}
from
'
@converse/headless/i18n
'
;
import
{
View
}
from
"
skeletor.js/src/view
"
;
import
{
pick
}
from
"
lodash
"
;
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
import
log
from
"
@converse/headless/log
"
;
import
tpl_form_input
from
"
templates/form_input.html
"
;
import
tpl_form_username
from
"
templates/form_username.html
"
;
...
...
@@ -64,9 +64,6 @@ converse.plugins.add('converse-register', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
_converse
.
CONNECTION_STATUS
[
Strophe
.
Status
.
REGIFAIL
]
=
'
REGIFAIL
'
;
_converse
.
CONNECTION_STATUS
[
Strophe
.
Status
.
REGISTERED
]
=
'
REGISTERED
'
;
_converse
.
CONNECTION_STATUS
[
Strophe
.
Status
.
CONFLICT
]
=
'
CONFLICT
'
;
...
...
src/converse-roomslist.js
View file @
bf4b3efa
...
...
@@ -8,7 +8,7 @@
*/
import
"
@converse/headless/converse-muc
"
;
import
RoomDetailsModal
from
'
modals/muc-details.js
'
;
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
import
tpl_rooms_list
from
"
templates/rooms_list.js
"
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
{
View
}
from
'
skeletor.js/src/view.js
'
;
...
...
@@ -39,8 +39,6 @@ converse.plugins.add('converse-roomslist', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
// Promises exposed by this plugin
api
.
promises
.
add
(
'
roomsListInitialized
'
);
...
...
src/converse-rosterview.js
View file @
bf4b3efa
...
...
@@ -6,12 +6,6 @@
import
"
@converse/headless/converse-chatboxes
"
;
import
"
@converse/headless/converse-roster
"
;
import
"
converse-modal
"
;
import
{
compact
,
debounce
,
has
,
isString
,
uniq
,
without
}
from
"
lodash
"
;
import
{
BootstrapModal
}
from
"
./converse-modal.js
"
;
import
{
View
}
from
'
skeletor.js/src/view.js
'
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
{
OrderedListView
}
from
"
skeletor.js/src/overview
"
;
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
log
from
"
@converse/headless/log
"
;
import
tpl_add_contact_modal
from
"
templates/add_contact_modal.js
"
;
import
tpl_group_header
from
"
templates/group_header.html
"
;
...
...
@@ -20,6 +14,13 @@ import tpl_requesting_contact from "templates/requesting_contact.html";
import
tpl_roster
from
"
templates/roster.html
"
;
import
tpl_roster_filter
from
"
templates/roster_filter.js
"
;
import
tpl_roster_item
from
"
templates/roster_item.html
"
;
import
{
BootstrapModal
}
from
"
./converse-modal.js
"
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
{
OrderedListView
}
from
"
skeletor.js/src/overview
"
;
import
{
View
}
from
'
skeletor.js/src/view.js
'
;
import
{
__
}
from
'
@converse/headless/i18n
'
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
compact
,
debounce
,
has
,
isString
,
uniq
,
without
}
from
"
lodash
"
;
const
{
Strophe
}
=
converse
.
env
;
const
u
=
converse
.
env
.
utils
;
...
...
@@ -33,9 +34,6 @@ converse.plugins.add('converse-rosterview', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
const
{
__
}
=
_converse
;
api
.
settings
.
update
({
'
autocomplete_add_contact
'
:
true
,
...
...
src/headless/converse-bookmarks.js
View file @
bf4b3efa
...
...
@@ -6,10 +6,10 @@
* @license Mozilla Public License (MPLv2)
*/
import
"
@converse/headless/converse-muc
"
;
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
log
from
"
./log
"
;
import
{
Collection
}
from
"
skeletor.js/src/collection
"
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
log
from
"
./log
"
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
const
{
Strophe
,
$iq
,
sizzle
}
=
converse
.
env
;
const
u
=
converse
.
env
.
utils
;
...
...
@@ -60,8 +60,6 @@ converse.plugins.add('converse-bookmarks', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
const
{
__
}
=
_converse
;
// Configuration values for this plugin
...
...
src/headless/converse-bosh.js
View file @
bf4b3efa
...
...
@@ -6,7 +6,7 @@
*/
import
'
strophe.js/src/bosh
'
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
{
converse
}
from
"
./converse-core
"
;
import
{
_converse
,
api
,
converse
}
from
"
./converse-core
"
;
import
log
from
"
./log
"
;
const
{
Strophe
}
=
converse
.
env
;
...
...
@@ -21,9 +21,6 @@ converse.plugins.add('converse-bosh', {
},
initialize
()
{
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
api
.
settings
.
update
({
bosh_service_url
:
undefined
,
prebind_url
:
null
...
...
src/headless/converse-chat.js
View file @
bf4b3efa
...
...
@@ -3,13 +3,13 @@
* @copyright 2020, the Converse.js contributors
* @license Mozilla Public License (MPLv2)
*/
import
{
find
,
isMatch
,
isObject
,
isString
,
pick
}
from
"
lodash
"
;
import
{
Collection
}
from
"
skeletor.js/src/collection
"
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
{
converse
}
from
"
./converse-core
"
;
import
filesize
from
"
filesize
"
;
import
log
from
"
./log
"
;
import
st
from
"
./utils/stanza
"
;
import
{
Collection
}
from
"
skeletor.js/src/collection
"
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
{
_converse
,
api
,
converse
}
from
"
./converse-core
"
;
import
{
find
,
isMatch
,
isObject
,
isString
,
pick
}
from
"
lodash
"
;
const
{
$msg
,
Strophe
,
sizzle
,
utils
}
=
converse
.
env
;
const
u
=
converse
.
env
.
utils
;
...
...
@@ -34,8 +34,6 @@ converse.plugins.add('converse-chat', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
const
{
__
}
=
_converse
;
// Configuration values for this plugin
...
...
src/headless/converse-chatboxes.js
View file @
bf4b3efa
...
...
@@ -5,7 +5,7 @@
*/
import
"
./converse-emoji
"
;
import
{
Collection
}
from
"
skeletor.js/src/collection
"
;
import
{
converse
}
from
"
./converse-core
"
;
import
{
_converse
,
api
,
converse
}
from
"
./converse-core
"
;
import
{
isString
}
from
"
lodash
"
;
import
log
from
"
./log
"
;
...
...
@@ -25,8 +25,6 @@ converse.plugins.add('converse-chatboxes', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
api
.
promises
.
add
([
'
chatBoxesFetched
'
,
...
...
src/headless/converse-disco.js
View file @
bf4b3efa
...
...
@@ -4,12 +4,12 @@
* @license Mozilla Public License (MPLv2)
* @description Converse plugin which add support for XEP-0030: Service Discovery
*/
import
{
isEmpty
,
isObject
}
from
"
lodash
"
;
import
{
Collection
}
from
"
skeletor.js/src/collection
"
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
{
converse
}
from
"
./converse-core
"
;
import
log
from
"
./log
"
;
import
sizzle
from
"
sizzle
"
;
import
{
Collection
}
from
"
skeletor.js/src/collection
"
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
{
_converse
,
api
,
converse
}
from
"
./converse-core
"
;
import
{
isEmpty
,
isObject
}
from
"
lodash
"
;
const
{
Strophe
,
$iq
,
utils
}
=
converse
.
env
;
...
...
@@ -19,8 +19,6 @@ converse.plugins.add('converse-disco', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
// Promises exposed by this plugin
api
.
promises
.
add
(
'
discoInitialized
'
);
...
...
src/headless/converse-emoji.js
View file @
bf4b3efa
...
...
@@ -6,7 +6,7 @@
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
{
find
,
uniq
}
from
"
lodash
"
;
import
*
as
twemoji
from
"
twemoji
"
;
import
{
converse
}
from
"
./converse-core
"
;
import
{
_converse
,
api
,
converse
}
from
"
./converse-core
"
;
const
u
=
converse
.
env
.
utils
;
...
...
@@ -60,8 +60,6 @@ converse.plugins.add('converse-emoji', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
const
{
___
}
=
_converse
;
api
.
settings
.
update
({
...
...
src/headless/converse-headlines.js
View file @
bf4b3efa
...
...
@@ -4,7 +4,7 @@
* @description XEP-0045 Multi-User Chat Views
*/
import
{
isString
}
from
"
lodash
"
;
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
import
st
from
"
./utils/stanza
"
;
...
...
@@ -45,8 +45,6 @@ converse.plugins.add('converse-headlines', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
/**
* Shows headline messages
...
...
src/headless/converse-mam.js
View file @
bf4b3efa
...
...
@@ -6,14 +6,12 @@
*/
import
"
./converse-disco
"
;
import
"
./converse-rsm
"
;
import
{
api
}
from
"
@converse/headless/converse-core
"
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
intersection
,
pick
}
from
'
lodash
'
import
{
converse
}
from
"
./converse-core
"
;
import
log
from
"
./log
"
;
import
sizzle
from
"
sizzle
"
;
import
st
from
"
./utils/stanza
"
;
let
_converse
;
const
{
Strophe
,
$iq
,
dayjs
}
=
converse
.
env
;
const
{
NS
}
=
Strophe
;
const
u
=
converse
.
env
.
utils
;
...
...
@@ -133,8 +131,6 @@ converse.plugins.add('converse-mam', {
/* The initialize function gets called as soon as the plugin is
* loaded by Converse.js's plugin machinery.
*/
_converse
=
this
.
_converse
;
api
.
settings
.
update
({
archived_messages_page_size
:
'
50
'
,
message_archiving
:
undefined
,
// Supported values are 'always', 'never', 'roster' (https://xmpp.org/extensions/xep-0313.html#prefs)
...
...
src/headless/converse-muc.js
View file @
bf4b3efa
...
...
@@ -10,7 +10,7 @@ import "./converse-emoji";
import
{
Collection
}
from
"
skeletor.js/src/collection
"
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
{
clone
,
debounce
,
intersection
,
invoke
,
isElement
,
isObject
,
isString
,
pick
,
uniq
,
zipObject
}
from
"
lodash
"
;
import
{
converse
}
from
"
./converse-core
"
;
import
{
_converse
,
api
,
converse
}
from
"
./converse-core
"
;
import
log
from
"
./log
"
;
import
muc_utils
from
"
./utils/muc
"
;
import
st
from
"
./utils/stanza
"
;
...
...
@@ -108,8 +108,6 @@ converse.plugins.add('converse-muc', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
const
{
__
,
___
}
=
_converse
;
// Configuration values for this plugin
...
...
src/headless/converse-ping.js
View file @
bf4b3efa
...
...
@@ -6,7 +6,7 @@
* @copyright 2020, the Converse.js contributors
* @license Mozilla Public License (MPLv2)
*/
import
{
converse
}
from
"
./converse-core
"
;
import
{
_converse
,
api
,
converse
}
from
"
./converse-core
"
;
import
log
from
"
./log
"
;
const
{
Strophe
,
$iq
}
=
converse
.
env
;
...
...
@@ -21,9 +21,6 @@ converse.plugins.add('converse-ping', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
let
lastStanzaDate
;
api
.
settings
.
update
({
...
...
src/headless/converse-pubsub.js
View file @
bf4b3efa
...
...
@@ -4,7 +4,7 @@
* @license Mozilla Public License (MPLv2)
*/
import
"
./converse-disco
"
;
import
{
converse
}
from
"
./converse-core
"
;
import
{
_converse
,
api
,
converse
}
from
"
./converse-core
"
;
import
log
from
"
./log
"
;
const
{
Strophe
,
$iq
}
=
converse
.
env
;
...
...
@@ -17,12 +17,6 @@ converse.plugins.add('converse-pubsub', {
dependencies
:
[
"
converse-disco
"
],
initialize
()
{
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
/************************ BEGIN API ************************/
// We extend the default converse.js API to add methods specific to MUC groupchats.
...
...
src/headless/converse-roster.js
View file @
bf4b3efa
...
...
@@ -7,7 +7,7 @@ import "@converse/headless/converse-status";
import
{
Collection
}
from
"
skeletor.js/src/collection
"
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
{
invoke
,
isEmpty
,
isNaN
,
isString
,
propertyOf
,
sum
}
from
"
lodash
"
;
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
import
log
from
"
./log
"
;
const
{
Strophe
,
$iq
,
$pres
,
dayjs
,
sizzle
}
=
converse
.
env
;
...
...
@@ -22,8 +22,6 @@ converse.plugins.add('converse-roster', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
const
{
__
}
=
_converse
;
api
.
settings
.
update
({
...
...
src/headless/converse-smacks.js
View file @
bf4b3efa
...
...
@@ -4,7 +4,7 @@
* @license Mozilla Public License (MPLv2)
* @description Converse.js plugin which adds support for XEP-0198: Stream Management
*/
import
{
converse
}
from
"
./converse-core
"
;
import
{
_converse
,
api
,
converse
}
from
"
./converse-core
"
;
import
log
from
"
./log
"
;
const
{
Strophe
}
=
converse
.
env
;
...
...
@@ -17,8 +17,6 @@ Strophe.addNamespace('SM', 'urn:xmpp:sm:3');
converse
.
plugins
.
add
(
'
converse-smacks
'
,
{
initialize
()
{
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
// Configuration values for this plugin
// ====================================
...
...
src/headless/converse-status.js
View file @
bf4b3efa
...
...
@@ -5,7 +5,7 @@
*/
import
{
isNaN
,
isObject
,
isString
}
from
"
lodash
"
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
{
converse
}
from
"
@converse/headless/converse-core
"
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
const
{
Strophe
,
$build
,
$pres
}
=
converse
.
env
;
...
...
@@ -13,8 +13,6 @@ const { Strophe, $build, $pres } = converse.env;
converse
.
plugins
.
add
(
'
converse-status
'
,
{
initialize
()
{
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
api
.
settings
.
update
({
auto_away
:
0
,
// Seconds after which user status is set to 'away'
...
...
src/headless/converse-vcard.js
View file @
bf4b3efa
...
...
@@ -4,12 +4,12 @@
* @license Mozilla Public License (MPLv2)
*/
import
"
./converse-status
"
;
import
log
from
"
@converse/headless/log
"
;
import
tpl_vcard
from
"
./templates/vcard.html
"
;
import
{
Collection
}
from
"
skeletor.js/src/collection
"
;
import
{
Model
}
from
'
skeletor.js/src/model.js
'
;
import
{
_converse
,
api
,
converse
}
from
"
./converse-core
"
;
import
{
has
,
isString
}
from
"
lodash
"
;
import
{
converse
}
from
"
./converse-core
"
;
import
log
from
"
@converse/headless/log
"
;
import
tpl_vcard
from
"
./templates/vcard.html
"
;
const
{
Strophe
,
$iq
,
dayjs
}
=
converse
.
env
;
const
u
=
converse
.
env
.
utils
;
...
...
@@ -64,9 +64,6 @@ converse.plugins.add('converse-vcard', {
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
const
{
_converse
}
=
this
;
const
{
api
}
=
_converse
;
api
.
promises
.
add
(
'
VCardsInitialized
'
);
...
...
src/modals/muc-commands.js
View file @
bf4b3efa
import
{
BootstrapModal
}
from
"
../converse-modal.js
"
;
import
{
__
}
from
'
@converse/headless/i18n
'
;
import
{
api
}
from
"
@converse/headless/converse-core
"
;
import
{
api
,
converse
}
from
"
@converse/headless/converse-core
"
;
import
log
from
"
@converse/headless/log
"
;
import
sizzle
from
"
sizzle
"
;
import
tpl_muc_commands_modal
from
"
../templates/muc_commands_modal.js
"
;
const
{
Strophe
,
$iq
}
=
window
.
converse
.
env
;
const
u
=
window
.
converse
.
env
.
utils
;
const
{
Strophe
,
$iq
}
=
converse
.
env
;
const
u
=
converse
.
env
.
utils
;
export
default
BootstrapModal
.
extend
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment