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
63888dd4
Commit
63888dd4
authored
Feb 02, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing tests
parent
890d87c9
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
37 additions
and
33 deletions
+37
-33
embedded.html
embedded.html
+1
-1
spec/chatbox.js
spec/chatbox.js
+0
-6
src/converse-api.js
src/converse-api.js
+1
-1
src/converse-bookmarks.js
src/converse-bookmarks.js
+1
-1
src/converse-chatview.js
src/converse-chatview.js
+1
-1
src/converse-controlbox.js
src/converse-controlbox.js
+1
-1
src/converse-core.js
src/converse-core.js
+1
-1
src/converse-headline.js
src/converse-headline.js
+1
-0
src/converse-muc-embedded.js
src/converse-muc-embedded.js
+7
-0
src/converse-muc.js
src/converse-muc.js
+23
-21
No files found.
embedded.html
View file @
63888dd4
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
hide_muc_server
:
true
,
// Federation is disabled, so no use in
hide_muc_server
:
true
,
// Federation is disabled, so no use in
// showing the MUC server.
// showing the MUC server.
play_sounds
:
true
,
play_sounds
:
true
,
show_controlbox_by_default
:
tru
e
,
show_controlbox_by_default
:
fals
e
,
strict_plugin_dependencies
:
false
,
strict_plugin_dependencies
:
false
,
debug
:
true
debug
:
true
});
});
...
...
spec/chatbox.js
View file @
63888dd4
...
@@ -756,12 +756,6 @@
...
@@ -756,12 +756,6 @@
}));
}));
});
});
describe
(
"
when sent by the current user
"
,
function
()
{
it
(
"
will always cause the chat area to be scrolled down
"
,
mock
.
initConverse
(
function
(
_converse
)
{
// TODO
}));
});
it
(
"
is ignored if it's a malformed headline message
"
,
mock
.
initConverse
(
function
(
_converse
)
{
it
(
"
is ignored if it's a malformed headline message
"
,
mock
.
initConverse
(
function
(
_converse
)
{
test_utils
.
createContacts
(
_converse
,
'
current
'
);
test_utils
.
createContacts
(
_converse
,
'
current
'
);
test_utils
.
openControlBox
();
test_utils
.
openControlBox
();
...
...
src/converse-api.js
View file @
63888dd4
// Converse.js (A browser based XMPP chat client)
// Converse.js (A browser based XMPP chat client)
// http://conversejs.org
// http://conversejs.org
//
//
// Copyright (c) 2012-201
6
, Jan-Carel Brand <jc@opkode.com>
// Copyright (c) 2012-201
7
, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
// Licensed under the Mozilla Public License (MPLv2)
//
//
/*global define */
/*global define */
...
...
src/converse-bookmarks.js
View file @
63888dd4
// Converse.js (A browser based XMPP chat client)
// Converse.js (A browser based XMPP chat client)
// http://conversejs.org
// http://conversejs.org
//
//
// Copyright (c) 2012-201
6
, Jan-Carel Brand <jc@opkode.com>
// Copyright (c) 2012-201
7
, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
// Licensed under the Mozilla Public License (MPLv2)
//
//
/*global Backbone, define */
/*global Backbone, define */
...
...
src/converse-chatview.js
View file @
63888dd4
// Converse.js (A browser based XMPP chat client)
// Converse.js (A browser based XMPP chat client)
// http://conversejs.org
// http://conversejs.org
//
//
// Copyright (c) 2012-201
6
, Jan-Carel Brand <jc@opkode.com>
// Copyright (c) 2012-201
7
, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
// Licensed under the Mozilla Public License (MPLv2)
//
//
/*global Backbone, define */
/*global Backbone, define */
...
...
src/converse-controlbox.js
View file @
63888dd4
// Converse.js (A browser based XMPP chat client)
// Converse.js (A browser based XMPP chat client)
// http://conversejs.org
// http://conversejs.org
//
//
// Copyright (c) 2012-201
6
, Jan-Carel Brand <jc@opkode.com>
// Copyright (c) 2012-201
7
, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
// Licensed under the Mozilla Public License (MPLv2)
//
//
/*global define, Backbone */
/*global define, Backbone */
...
...
src/converse-core.js
View file @
63888dd4
// Converse.js (A browser based XMPP chat client)
// Converse.js (A browser based XMPP chat client)
// http://conversejs.org
// http://conversejs.org
//
//
// Copyright (c) 2012-201
6
, Jan-Carel Brand <jc@opkode.com>
// Copyright (c) 2012-201
7
, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
// Licensed under the Mozilla Public License (MPLv2)
//
//
/*global Backbone, define, window, document */
/*global Backbone, define, window, document */
...
...
src/converse-headline.js
View file @
63888dd4
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
/* Handler method for all incoming messages of type "headline".
/* Handler method for all incoming messages of type "headline".
*/
*/
var
from_jid
=
message
.
getAttribute
(
'
from
'
);
var
from_jid
=
message
.
getAttribute
(
'
from
'
);
var
_converse
=
this
.
__super__
.
_converse
;
if
(
utils
.
isHeadlineMessage
(
message
))
{
if
(
utils
.
isHeadlineMessage
(
message
))
{
_converse
.
chatboxes
.
create
({
_converse
.
chatboxes
.
create
({
'
id
'
:
from_jid
,
'
id
'
:
from_jid
,
...
...
src/converse-muc-embedded.js
View file @
63888dd4
// Converse.js (A browser based XMPP chat client)
// http://conversejs.org
//
// Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
/*global Backbone */
(
function
(
root
,
factory
)
{
(
function
(
root
,
factory
)
{
define
(
"
converse-muc-embedded
"
,
[
define
(
"
converse-muc-embedded
"
,
[
"
converse-api
"
,
"
converse-api
"
,
...
...
src/converse-muc.js
View file @
63888dd4
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
*/
*/
(
function
(
root
,
factory
)
{
(
function
(
root
,
factory
)
{
define
(
"
converse-muc
"
,
[
define
(
"
converse-muc
"
,
[
"
converse-core
"
,
"
converse-api
"
,
"
converse-api
"
,
"
tpl!chatarea
"
,
"
tpl!chatarea
"
,
"
tpl!chatroom
"
,
"
tpl!chatroom
"
,
...
@@ -48,20 +47,6 @@
...
@@ -48,20 +47,6 @@
tpl_room_panel
tpl_room_panel
)
{
)
{
"
use strict
"
;
"
use strict
"
;
_converse
.
templates
.
chatarea
=
tpl_chatarea
;
_converse
.
templates
.
chatroom
=
tpl_chatroom
;
_converse
.
templates
.
chatroom_form
=
tpl_chatroom_form
;
_converse
.
templates
.
chatroom_nickname_form
=
tpl_chatroom_nickname_form
;
_converse
.
templates
.
chatroom_password_form
=
tpl_chatroom_password_form
;
_converse
.
templates
.
chatroom_sidebar
=
tpl_chatroom_sidebar
;
_converse
.
templates
.
chatroom_head
=
tpl_chatroom_head
;
_converse
.
templates
.
chatrooms_tab
=
tpl_chatrooms_tab
;
_converse
.
templates
.
info
=
tpl_info
;
_converse
.
templates
.
occupant
=
tpl_occupant
;
_converse
.
templates
.
room_description
=
tpl_room_description
;
_converse
.
templates
.
room_item
=
tpl_room_item
;
_converse
.
templates
.
room_panel
=
tpl_room_panel
;
var
ROOMS_PANEL_ID
=
'
chatrooms
'
;
var
ROOMS_PANEL_ID
=
'
chatrooms
'
;
// Strophe methods for building stanzas
// Strophe methods for building stanzas
...
@@ -77,10 +62,6 @@
...
@@ -77,10 +62,6 @@
_
=
converse
.
env
.
_
,
_
=
converse
.
env
.
_
,
moment
=
converse
.
env
.
moment
;
moment
=
converse
.
env
.
moment
;
// For translations
var
__
=
utils
.
__
.
bind
(
_converse
);
var
___
=
utils
.
___
;
// Add Strophe Namespaces
// Add Strophe Namespaces
Strophe
.
addNamespace
(
'
MUC_ADMIN
'
,
Strophe
.
NS
.
MUC
+
"
#admin
"
);
Strophe
.
addNamespace
(
'
MUC_ADMIN
'
,
Strophe
.
NS
.
MUC
+
"
#admin
"
);
Strophe
.
addNamespace
(
'
MUC_OWNER
'
,
Strophe
.
NS
.
MUC
+
"
#owner
"
);
Strophe
.
addNamespace
(
'
MUC_OWNER
'
,
Strophe
.
NS
.
MUC
+
"
#owner
"
);
...
@@ -111,6 +92,7 @@
...
@@ -111,6 +92,7 @@
* returned via the API.
* returned via the API.
*/
*/
if
(
!
chatbox
)
{
return
;
}
if
(
!
chatbox
)
{
return
;
}
var
_converse
=
this
.
__super__
.
_converse
;
var
view
=
_converse
.
chatboxviews
.
get
(
chatbox
.
get
(
'
id
'
));
var
view
=
_converse
.
chatboxviews
.
get
(
chatbox
.
get
(
'
id
'
));
var
box
=
this
.
__super__
.
wrappedChatBox
.
apply
(
this
,
arguments
);
var
box
=
this
.
__super__
.
wrappedChatBox
.
apply
(
this
,
arguments
);
box
.
is_chatroom
=
view
.
is_chatroom
;
box
.
is_chatroom
=
view
.
is_chatroom
;
...
@@ -119,6 +101,7 @@
...
@@ -119,6 +101,7 @@
Features
:
{
Features
:
{
addClientFeatures
:
function
()
{
addClientFeatures
:
function
()
{
var
_converse
=
this
.
__super__
.
_converse
;
this
.
__super__
.
addClientFeatures
.
apply
(
this
,
arguments
);
this
.
__super__
.
addClientFeatures
.
apply
(
this
,
arguments
);
if
(
_converse
.
allow_muc_invitations
)
{
if
(
_converse
.
allow_muc_invitations
)
{
_converse
.
connection
.
disco
.
addFeature
(
'
jabber:x:conference
'
);
// Invites
_converse
.
connection
.
disco
.
addFeature
(
'
jabber:x:conference
'
);
// Invites
...
@@ -191,6 +174,7 @@
...
@@ -191,6 +174,7 @@
ChatBoxViews
:
{
ChatBoxViews
:
{
onChatBoxAdded
:
function
(
item
)
{
onChatBoxAdded
:
function
(
item
)
{
var
_converse
=
this
.
__super__
.
_converse
;
var
view
=
this
.
get
(
item
.
get
(
'
id
'
));
var
view
=
this
.
get
(
item
.
get
(
'
id
'
));
if
(
!
view
&&
item
.
get
(
'
type
'
)
===
'
chatroom
'
)
{
if
(
!
view
&&
item
.
get
(
'
type
'
)
===
'
chatroom
'
)
{
view
=
new
_converse
.
ChatRoomView
({
'
model
'
:
item
});
view
=
new
_converse
.
ChatRoomView
({
'
model
'
:
item
});
...
@@ -206,6 +190,24 @@
...
@@ -206,6 +190,24 @@
/* The initialize function gets called as soon as the plugin is
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
* loaded by converse.js's plugin machinery.
*/
*/
var
_converse
=
this
.
_converse
,
__
=
_converse
.
__
,
___
=
_converse
.
___
;
_converse
.
templates
.
chatarea
=
tpl_chatarea
;
_converse
.
templates
.
chatroom
=
tpl_chatroom
;
_converse
.
templates
.
chatroom_form
=
tpl_chatroom_form
;
_converse
.
templates
.
chatroom_nickname_form
=
tpl_chatroom_nickname_form
;
_converse
.
templates
.
chatroom_password_form
=
tpl_chatroom_password_form
;
_converse
.
templates
.
chatroom_sidebar
=
tpl_chatroom_sidebar
;
_converse
.
templates
.
chatroom_head
=
tpl_chatroom_head
;
_converse
.
templates
.
chatrooms_tab
=
tpl_chatrooms_tab
;
_converse
.
templates
.
info
=
tpl_info
;
_converse
.
templates
.
occupant
=
tpl_occupant
;
_converse
.
templates
.
room_description
=
tpl_room_description
;
_converse
.
templates
.
room_item
=
tpl_room_item
;
_converse
.
templates
.
room_panel
=
tpl_room_panel
;
// XXX: Inside plugins, all calls to the translation machinery
// XXX: Inside plugins, all calls to the translation machinery
// (e.g. utils.__) should only be done in the initialize function.
// (e.g. utils.__) should only be done in the initialize function.
// If called before, we won't know what language the user wants,
// If called before, we won't know what language the user wants,
...
@@ -2376,9 +2378,9 @@
...
@@ -2376,9 +2378,9 @@
*/
*/
_
.
each
(
_converse
.
auto_join_rooms
,
function
(
room
)
{
_
.
each
(
_converse
.
auto_join_rooms
,
function
(
room
)
{
if
(
_
.
isString
(
room
))
{
if
(
_
.
isString
(
room
))
{
converse
.
api
.
rooms
.
open
(
room
);
_
converse
.
api
.
rooms
.
open
(
room
);
}
else
if
(
_
.
isObject
(
room
))
{
}
else
if
(
_
.
isObject
(
room
))
{
converse
.
api
.
rooms
.
open
(
room
.
jid
,
room
.
nick
);
_
converse
.
api
.
rooms
.
open
(
room
.
jid
,
room
.
nick
);
}
else
{
}
else
{
_converse
.
log
(
'
Invalid room criteria specified for "auto_join_rooms"
'
,
'
error
'
);
_converse
.
log
(
'
Invalid room criteria specified for "auto_join_rooms"
'
,
'
error
'
);
}
}
...
...
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