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
1676258c
Commit
1676258c
authored
Mar 13, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the MAM features to a separate plugin.
parent
da72be8f
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
229 additions
and
159 deletions
+229
-159
converse.js
converse.js
+2
-0
spec/mam.js
spec/mam.js
+2
-2
src/converse-api.js
src/converse-api.js
+0
-3
src/converse-core.js
src/converse-core.js
+7
-151
src/converse-headline.js
src/converse-headline.js
+1
-1
src/converse-mam.js
src/converse-mam.js
+216
-0
src/converse-muc.js
src/converse-muc.js
+1
-2
No files found.
converse.js
View file @
1676258c
...
@@ -50,6 +50,7 @@ require.config({
...
@@ -50,6 +50,7 @@ require.config({
"
converse-controlbox
"
:
"
src/converse-controlbox
"
,
"
converse-controlbox
"
:
"
src/converse-controlbox
"
,
"
converse-core
"
:
"
src/converse-core
"
,
"
converse-core
"
:
"
src/converse-core
"
,
"
converse-headline
"
:
"
src/converse-headline
"
,
"
converse-headline
"
:
"
src/converse-headline
"
,
"
converse-mam
"
:
"
src/converse-mam
"
,
"
converse-muc
"
:
"
src/converse-muc
"
,
"
converse-muc
"
:
"
src/converse-muc
"
,
"
converse-notification
"
:
"
src/converse-notification
"
,
"
converse-notification
"
:
"
src/converse-notification
"
,
"
converse-otr
"
:
"
src/converse-otr
"
,
"
converse-otr
"
:
"
src/converse-otr
"
,
...
@@ -228,6 +229,7 @@ if (typeof define !== 'undefined') {
...
@@ -228,6 +229,7 @@ if (typeof define !== 'undefined') {
// translations that you care about.
// translations that you care about.
"
converse-chatview
"
,
// Renders standalone chat boxes for single user chat
"
converse-chatview
"
,
// Renders standalone chat boxes for single user chat
"
converse-mam
"
,
"
converse-muc
"
,
// XEP-0045 Multi-user chat
"
converse-muc
"
,
// XEP-0045 Multi-user chat
"
converse-otr
"
,
// Off-the-record encryption for one-on-one messages
"
converse-otr
"
,
// Off-the-record encryption for one-on-one messages
"
converse-controlbox
"
,
// The control box
"
converse-controlbox
"
,
// The control box
...
...
spec/mam.js
View file @
1676258c
...
@@ -378,7 +378,7 @@
...
@@ -378,7 +378,7 @@
sent_stanza
=
iq
;
sent_stanza
=
iq
;
IQ_id
=
sendIQ
.
bind
(
this
)(
iq
,
callback
,
errback
);
IQ_id
=
sendIQ
.
bind
(
this
)(
iq
,
callback
,
errback
);
});
});
spyOn
(
converse
.
features
,
'
onMAMPreferences
'
).
andCallThrough
();
spyOn
(
converse
,
'
onMAMPreferences
'
).
andCallThrough
();
var
feature
=
new
converse
.
Feature
({
var
feature
=
new
converse
.
Feature
({
'
var
'
:
Strophe
.
NS
.
MAM
'
var
'
:
Strophe
.
NS
.
MAM
...
@@ -409,7 +409,7 @@
...
@@ -409,7 +409,7 @@
.
c
(
'
never
'
).
c
(
'
jid
'
).
t
(
'
montague@montague.lit
'
);
.
c
(
'
never
'
).
c
(
'
jid
'
).
t
(
'
montague@montague.lit
'
);
converse
.
connection
.
_dataRecv
(
test_utils
.
createRequest
(
stanza
));
converse
.
connection
.
_dataRecv
(
test_utils
.
createRequest
(
stanza
));
expect
(
converse
.
features
.
onMAMPreferences
).
toHaveBeenCalled
();
expect
(
converse
.
onMAMPreferences
).
toHaveBeenCalled
();
expect
(
converse
.
connection
.
sendIQ
.
callCount
).
toBe
(
2
);
expect
(
converse
.
connection
.
sendIQ
.
callCount
).
toBe
(
2
);
expect
(
sent_stanza
.
toString
()).
toBe
(
expect
(
sent_stanza
.
toString
()).
toBe
(
...
...
src/converse-api.js
View file @
1676258c
...
@@ -122,9 +122,6 @@
...
@@ -122,9 +122,6 @@
return
_
.
map
(
jids
,
_
.
partial
(
_
.
compose
(
converse
.
wrappedChatBox
,
converse
.
chatboxes
.
getChatBox
.
bind
(
converse
.
chatboxes
)),
_
,
true
));
return
_
.
map
(
jids
,
_
.
partial
(
_
.
compose
(
converse
.
wrappedChatBox
,
converse
.
chatboxes
.
getChatBox
.
bind
(
converse
.
chatboxes
)),
_
,
true
));
}
}
},
},
'
archive
'
:
{
'
query
'
:
converse
.
queryForArchivedMessages
.
bind
(
converse
)
},
'
tokens
'
:
{
'
tokens
'
:
{
'
get
'
:
function
(
id
)
{
'
get
'
:
function
(
id
)
{
if
(
!
converse
.
expose_rid_and_sid
||
typeof
converse
.
connection
===
"
undefined
"
)
{
if
(
!
converse
.
expose_rid_and_sid
||
typeof
converse
.
connection
===
"
undefined
"
)
{
...
...
src/converse-core.js
View file @
1676258c
This diff is collapsed.
Click to expand it.
src/converse-headline.js
View file @
1676258c
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
"
converse-core
"
,
"
converse-core
"
,
"
converse-api
"
,
"
converse-api
"
,
// TODO: remove this dependency
// TODO: remove this dependency
"
converse-chat
"
"
converse-chat
view
"
],
factory
);
],
factory
);
}(
this
,
function
(
converse
,
converse_api
)
{
}(
this
,
function
(
converse
,
converse_api
)
{
"
use strict
"
;
"
use strict
"
;
...
...
src/converse-mam.js
0 → 100644
View file @
1676258c
This diff is collapsed.
Click to expand it.
src/converse-muc.js
View file @
1676258c
...
@@ -887,7 +887,6 @@
...
@@ -887,7 +887,6 @@
onChatRoomMessage
:
function
(
message
)
{
onChatRoomMessage
:
function
(
message
)
{
var
$message
=
$
(
message
),
var
$message
=
$
(
message
),
archive_id
=
$message
.
find
(
'
result[xmlns="
'
+
Strophe
.
NS
.
MAM
+
'
"]
'
).
attr
(
'
id
'
),
$forwarded
=
$message
.
find
(
'
forwarded
'
),
$forwarded
=
$message
.
find
(
'
forwarded
'
),
$delay
;
$delay
;
...
@@ -916,7 +915,7 @@
...
@@ -916,7 +915,7 @@
if
(
sender
===
''
)
{
if
(
sender
===
''
)
{
return
true
;
return
true
;
}
}
this
.
model
.
createMessage
(
$message
,
$delay
,
archive_id
);
this
.
model
.
createMessage
(
$message
,
$delay
);
if
(
sender
!==
this
.
model
.
get
(
'
nick
'
))
{
if
(
sender
!==
this
.
model
.
get
(
'
nick
'
))
{
// We only emit an event if it's not our own message
// We only emit an event if it's not our own message
converse
.
emit
(
'
message
'
,
message
);
converse
.
emit
(
'
message
'
,
message
);
...
...
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