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
b3e9a177
Commit
b3e9a177
authored
Mar 28, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #617 from lixmal/master
Remove split of fullname. Fixes #609
parents
d2b2437a
eec2a4f5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
11 deletions
+13
-11
docs/CHANGES.md
docs/CHANGES.md
+2
-0
spec/chatbox.js
spec/chatbox.js
+8
-10
src/converse-core.js
src/converse-core.js
+3
-1
No files found.
docs/CHANGES.md
View file @
b3e9a177
...
...
@@ -32,6 +32,8 @@
generate random resource [davec82]
-
#598 Add option
`synchronize_availability`
[davec82]
-
#600 Fix change xmpp status also on icon-status click [davec82]
-
#616 converse-otr should depend on converse-minimize [jcbrand]
-
#609 Remove split of fullname [lixmal]
## 0.10.1 (2016-02-06)
...
...
spec/chatbox.js
View file @
b3e9a177
...
...
@@ -446,9 +446,7 @@
expect
(
chatbox
.
messages
.
length
).
toEqual
(
1
);
var
msg_obj
=
chatbox
.
messages
.
models
[
0
];
expect
(
msg_obj
.
get
(
'
message
'
)).
toEqual
(
message
);
// XXX: This is stupid, fullname is actually only the
// users first name
expect
(
msg_obj
.
get
(
'
fullname
'
)).
toEqual
(
mock
.
cur_names
[
0
].
split
(
'
'
)[
0
]);
expect
(
msg_obj
.
get
(
'
fullname
'
)).
toEqual
(
mock
.
cur_names
[
0
]);
expect
(
msg_obj
.
get
(
'
sender
'
)).
toEqual
(
'
them
'
);
expect
(
msg_obj
.
get
(
'
delayed
'
)).
toEqual
(
false
);
// Now check that the message appears inside the chatbox in the DOM
...
...
@@ -506,7 +504,7 @@
expect
(
chatbox
.
messages
.
length
).
toEqual
(
1
);
var
msg_obj
=
chatbox
.
messages
.
models
[
0
];
expect
(
msg_obj
.
get
(
'
message
'
)).
toEqual
(
msgtext
);
expect
(
msg_obj
.
get
(
'
fullname
'
)).
toEqual
(
mock
.
cur_names
[
1
]
.
split
(
'
'
)[
0
]
);
expect
(
msg_obj
.
get
(
'
fullname
'
)).
toEqual
(
mock
.
cur_names
[
1
]);
expect
(
msg_obj
.
get
(
'
sender
'
)).
toEqual
(
'
them
'
);
expect
(
msg_obj
.
get
(
'
delayed
'
)).
toEqual
(
false
);
// Now check that the message appears inside the chatbox in the DOM
...
...
@@ -547,7 +545,7 @@
expect
(
chatbox
.
messages
.
length
).
toEqual
(
1
);
var
msg_obj
=
chatbox
.
messages
.
models
[
0
];
expect
(
msg_obj
.
get
(
'
message
'
)).
toEqual
(
msgtext
);
expect
(
msg_obj
.
get
(
'
fullname
'
)).
toEqual
(
mock
.
cur_names
[
5
]
.
split
(
'
'
)[
0
]
);
expect
(
msg_obj
.
get
(
'
fullname
'
)).
toEqual
(
mock
.
cur_names
[
5
]);
expect
(
msg_obj
.
get
(
'
sender
'
)).
toEqual
(
'
me
'
);
expect
(
msg_obj
.
get
(
'
delayed
'
)).
toEqual
(
false
);
// Now check that the message appears inside the chatbox in the DOM
...
...
@@ -631,7 +629,7 @@
expect
(
chatbox
.
messages
.
length
).
toEqual
(
1
);
msg_obj
=
chatbox
.
messages
.
models
[
0
];
expect
(
msg_obj
.
get
(
'
message
'
)).
toEqual
(
message
);
expect
(
msg_obj
.
get
(
'
fullname
'
)).
toEqual
(
contact_name
.
split
(
'
'
)[
0
]
);
expect
(
msg_obj
.
get
(
'
fullname
'
)).
toEqual
(
contact_name
);
expect
(
msg_obj
.
get
(
'
sender
'
)).
toEqual
(
'
them
'
);
expect
(
msg_obj
.
get
(
'
delayed
'
)).
toEqual
(
true
);
msg_txt
=
$chat_content
.
find
(
'
.chat-message
'
).
find
(
'
.chat-msg-content
'
).
text
();
...
...
@@ -662,7 +660,7 @@
expect
(
chatbox
.
messages
.
length
).
toEqual
(
2
);
msg_obj
=
chatbox
.
messages
.
models
[
1
];
expect
(
msg_obj
.
get
(
'
message
'
)).
toEqual
(
message
);
expect
(
msg_obj
.
get
(
'
fullname
'
)).
toEqual
(
contact_name
.
split
(
'
'
)[
0
]
);
expect
(
msg_obj
.
get
(
'
fullname
'
)).
toEqual
(
contact_name
);
expect
(
msg_obj
.
get
(
'
sender
'
)).
toEqual
(
'
them
'
);
expect
(
msg_obj
.
get
(
'
delayed
'
)).
toEqual
(
false
);
msg_txt
=
$chat_content
.
find
(
'
.chat-message
'
).
last
().
find
(
'
.chat-msg-content
'
).
text
();
...
...
@@ -893,7 +891,7 @@
// Check that the notification appears inside the chatbox in the DOM
var
$events
=
chatboxview
.
$el
.
find
(
'
.chat-event
'
);
expect
(
$events
.
length
).
toBe
(
1
);
expect
(
$events
.
text
()).
toEqual
(
mock
.
cur_names
[
1
]
.
split
(
'
'
)[
0
]
+
'
is typing
'
);
expect
(
$events
.
text
()).
toEqual
(
mock
.
cur_names
[
1
]
+
'
is typing
'
);
}.
bind
(
converse
));
}.
bind
(
converse
));
...
...
@@ -967,7 +965,7 @@
var
chatboxview
=
this
.
chatboxviews
.
get
(
sender_jid
);
var
$events
=
chatboxview
.
$el
.
find
(
'
.chat-event
'
);
expect
(
$events
.
length
).
toBe
(
1
);
expect
(
$events
.
text
()).
toEqual
(
mock
.
cur_names
[
1
]
.
split
(
'
'
)[
0
]
+
'
has stopped typing
'
);
expect
(
$events
.
text
()).
toEqual
(
mock
.
cur_names
[
1
]
+
'
has stopped typing
'
);
}.
bind
(
converse
));
}.
bind
(
converse
));
...
...
@@ -1073,7 +1071,7 @@
var
chatboxview
=
this
.
chatboxviews
.
get
(
sender_jid
);
var
$events
=
chatboxview
.
$el
.
find
(
'
.chat-event
'
);
expect
(
$events
.
length
).
toBe
(
1
);
expect
(
$events
.
text
()).
toEqual
(
mock
.
cur_names
[
1
]
.
split
(
'
'
)[
0
]
+
'
has gone away
'
);
expect
(
$events
.
text
()).
toEqual
(
mock
.
cur_names
[
1
]
+
'
has gone away
'
);
}.
bind
(
converse
));
}.
bind
(
converse
));
}.
bind
(
converse
));
...
...
src/converse-core.js
View file @
b3e9a177
...
...
@@ -1242,7 +1242,9 @@
}
else
{
from
=
Strophe
.
getBareJidFromJid
(
$message
.
attr
(
'
from
'
));
}
fullname
=
(
_
.
isEmpty
(
fullname
)
?
from
:
fullname
).
split
(
'
'
)[
0
];
if
(
_
.
isEmpty
(
fullname
))
{
fullname
=
from
;
}
if
(
delayed
)
{
stamp
=
$delay
.
attr
(
'
stamp
'
);
time
=
stamp
;
...
...
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