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
1b9ba58a
Commit
1b9ba58a
authored
Nov 20, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename variable to be more accurate
parent
99f539b3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
7 deletions
+8
-7
spec/messages.js
spec/messages.js
+3
-2
src/headless/converse-chat.js
src/headless/converse-chat.js
+2
-2
src/headless/converse-muc.js
src/headless/converse-muc.js
+1
-1
src/headless/utils/stanza.js
src/headless/utils/stanza.js
+1
-1
src/templates/message.html
src/templates/message.html
+1
-1
No files found.
spec/messages.js
View file @
1b9ba58a
...
...
@@ -1174,7 +1174,8 @@
expect
(
u
.
hasClass
(
'
chat-msg--followup
'
,
chat_content
.
querySelector
(
'
.message:nth-child(4)
'
))).
toBe
(
true
);
expect
(
chat_content
.
querySelector
(
'
.message:nth-child(4) .chat-msg__text
'
).
textContent
).
toBe
(
"
A delayed message, sent 5 minutes since we started
"
);
expect
(
u
.
hasClass
(
'
chat-msg--followup
'
,
chat_content
.
querySelector
(
'
.message:nth-child(5)
'
))).
toBe
(
true
);
expect
(
u
.
hasClass
(
'
chat-msg--followup
'
,
chat_content
.
querySelector
(
'
.message:nth-child(5)
'
))).
toBe
(
false
);
expect
(
chat_content
.
querySelector
(
'
.message:nth-child(5) .chat-msg__text
'
).
textContent
).
toBe
(
"
Another message 14 minutes since we started
"
);
expect
(
u
.
hasClass
(
'
chat-msg--followup
'
,
chat_content
.
querySelector
(
'
.message:nth-child(6)
'
))).
toBe
(
true
);
...
...
@@ -1207,7 +1208,7 @@
expect
(
u
.
hasClass
(
'
chat-msg--followup
'
,
chat_content
.
querySelector
(
'
.message:nth-child(5)
'
))).
toBe
(
false
);
expect
(
chat_content
.
querySelector
(
'
.message:nth-child(5) .chat-msg__text
'
).
textContent
).
toBe
(
"
A delayed message, sent 5 minutes since we started
"
);
expect
(
u
.
hasClass
(
'
chat-msg--followup
'
,
chat_content
.
querySelector
(
'
.message:nth-child(6)
'
))).
toBe
(
tru
e
);
expect
(
u
.
hasClass
(
'
chat-msg--followup
'
,
chat_content
.
querySelector
(
'
.message:nth-child(6)
'
))).
toBe
(
fals
e
);
expect
(
chat_content
.
querySelector
(
'
.message:nth-child(6) .chat-msg__text
'
).
textContent
).
toBe
(
"
Another message 14 minutes since we started
"
);
expect
(
u
.
hasClass
(
'
chat-msg--followup
'
,
chat_content
.
querySelector
(
'
.message:nth-child(7)
'
))).
toBe
(
true
);
...
...
src/headless/converse-chat.js
View file @
1b9ba58a
...
...
@@ -849,7 +849,7 @@ converse.plugins.add('converse-chat', {
'
origin_id
'
:
origin_id
,
'
fullname
'
:
_converse
.
xmppstatus
.
get
(
'
fullname
'
),
'
from
'
:
_converse
.
bare_jid
,
'
is_
single_emoji
'
:
text
?
u
.
isOnlyEmojis
(
text
)
:
false
,
'
is_
only_emojis
'
:
text
?
u
.
isOnlyEmojis
(
text
)
:
false
,
'
sender
'
:
'
me
'
,
'
time
'
:
(
new
Date
()).
toISOString
(),
'
message
'
:
text
?
u
.
httpToGeoUri
(
u
.
shortnameToUnicode
(
text
),
_converse
)
:
undefined
,
...
...
@@ -912,7 +912,7 @@ converse.plugins.add('converse-chat', {
'
message
'
:
attrs
.
message
,
'
older_versions
'
:
older_versions
,
'
references
'
:
attrs
.
references
,
'
is_
single_emoji
'
:
attrs
.
message
?
u
.
isOnlyEmojis
(
attrs
.
message
)
:
false
,
'
is_
only_emojis
'
:
attrs
.
is_only_emojis
,
'
origin_id
'
:
u
.
getUniqueId
(),
'
received
'
:
undefined
});
...
...
src/headless/converse-muc.js
View file @
1b9ba58a
...
...
@@ -793,7 +793,7 @@ converse.plugins.add('converse-muc', {
'
origin_id
'
:
origin_id
,
'
from
'
:
`
${
this
.
get
(
'
jid
'
)}
/
${
this
.
get
(
'
nick
'
)}
`
,
'
fullname
'
:
this
.
get
(
'
nick
'
),
'
is_
single_emoji
'
:
text
?
u
.
isOnlyEmojis
(
text
)
:
false
,
'
is_
only_emojis
'
:
text
?
u
.
isOnlyEmojis
(
text
)
:
false
,
'
is_spoiler
'
:
is_spoiler
,
'
message
'
:
text
?
u
.
httpToGeoUri
(
u
.
shortnameToUnicode
(
text
),
_converse
)
:
undefined
,
'
nick
'
:
this
.
get
(
'
nick
'
),
...
...
src/headless/utils/stanza.js
View file @
1b9ba58a
...
...
@@ -294,7 +294,7 @@ const stanza_utils = {
'
chat_state
'
:
stanza_utils
.
getChatState
(
stanza
),
'
is_archived
'
:
stanza_utils
.
isArchived
(
original_stanza
),
'
is_delayed
'
:
!!
delay
,
'
is_
single_emoji
'
:
text
?
await
u
.
isOnlyEmojis
(
text
)
:
false
,
'
is_
only_emojis
'
:
text
?
await
u
.
isOnlyEmojis
(
text
)
:
false
,
'
message
'
:
text
,
'
msgid
'
:
stanza
.
getAttribute
(
'
id
'
)
||
original_stanza
.
getAttribute
(
'
id
'
),
'
references
'
:
stanza_utils
.
getReferences
(
stanza
),
...
...
src/templates/message.html
View file @
1b9ba58a
...
...
@@ -30,7 +30,7 @@
<div
class=
"chat-msg__subject"
>
{{{ o.subject }}}
</div>
{[ } ]}
<div
class=
"chat-msg__text
{[ if (o.is_
single_emoji
) { ]} chat-msg__text--larger{[ } ]}
{[ if (o.is_
only_emojis
) { ]} chat-msg__text--larger{[ } ]}
{[ if (o.is_spoiler) { ]} spoiler collapsed{[ } ]}"
>
<!-- message gets added here via renderMessage -->
</div>
<div
class=
"chat-msg__media"
></div>
{[ } ]}
...
...
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