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
7b0e9df4
Commit
7b0e9df4
authored
Jun 04, 2020
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New config option: show_message_avatar
parent
95b015f0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
25 deletions
+42
-25
CHANGES.md
CHANGES.md
+1
-0
docs/source/configuration.rst
docs/source/configuration.rst
+35
-24
src/components/message.js
src/components/message.js
+5
-1
src/converse-chatview.js
src/converse-chatview.js
+1
-0
No files found.
CHANGES.md
View file @
7b0e9df4
...
...
@@ -42,6 +42,7 @@ Soon we'll deprecate the latter, so prepare now.
-
New config option
[
modtools_disable_query
](
https://conversejs.org/docs/html/configuration.html#modtools-disable-query
)
-
New config option
[
muc_hats_from_vcard
](
https://conversejs.org/docs/html/configuration.html#muc-hats-from-vcard
)
.
-
New config option
[
muc_send_probes
](
https://conversejs.org/docs/html/configuration.html#muc-send-probes
)
.
-
New config option
[
show_message_avatar
](
https://conversejs.org/docs/html/configuration.html#show-message-avatar
)
.
## 6.0.0 (2020-01-09)
...
...
docs/source/configuration.rst
View file @
7b0e9df4
...
...
@@ -1592,30 +1592,6 @@ For example:
Valid values are ``'active', 'composing', 'gone' 'inactive', 'paused'``
show_images_inline
------------------
* Default: ``true``
If set to false, images won't be rendered in chats, instead only their links will be shown.
singleton
---------
* Default: ``false``
If set to ``true``, then only one chat (one-on-one or groupchat) will be allowed.
The chat must be specified with the `auto_join_rooms`_ or `auto_join_private_chats`_ options.
This setting is useful together with `view_mode`_ set to ``embedded``, when you
want to embed a chat into the page.
Alternatively you could use it with `view_mode`_ set to ``overlayed`` to create
a single helpdesk-type chat.
show_chat_state_notifications
-----------------------------
...
...
@@ -1669,6 +1645,23 @@ not fulfilled.
Requires the `src/converse-notification.js` plugin.
show_message_avatar
-------------------
* Default: ``true``
Whether chat messages should also render the author's avatar.
show_images_inline
------------------
* Default: ``true``
If set to ``false``, images won't be rendered in chats, instead only their links will be shown.
show_retraction_warning
-----------------------
...
...
@@ -1698,6 +1691,24 @@ Adds a button to the chat which can be clicked or tapped in order to send the
message.
singleton
---------
* Default: ``false``
If set to ``true``, then only one chat (one-on-one or groupchat) will be allowed.
The chat must be specified with the `auto_join_rooms`_ or `auto_join_private_chats`_ options.
This setting is useful together with `view_mode`_ set to ``embedded``, when you
want to embed a chat into the page.
Alternatively you could use it with `view_mode`_ set to ``overlayed`` to create
a single helpdesk-type chat.
smacks_max_unacked_stanzas
--------------------------
...
...
src/components/message.js
View file @
7b0e9df4
...
...
@@ -132,7 +132,7 @@ class Message extends CustomElement {
${
this
.
isFollowup
()
?
'
chat-msg--followup
'
:
''
}
"
data-isodate="
${
this
.
time
}
" data-msgid="
${
this
.
msgid
}
" data-from="
${
this
.
from
}
" data-encrypted="
${
this
.
is_encrypted
}
">
${
(
this
.
is_me_message
||
this
.
type
===
'
headline
'
)
?
''
:
renderAvatar
(
this
.
getAvatarData
())
}
${
this
.
shouldShowAvatar
()
?
renderAvatar
(
this
.
getAvatarData
())
:
''
}
<div class="chat-msg__content chat-msg__content--
${
this
.
sender
}
${
this
.
is_me_message
?
'
chat-msg__content--action
'
:
''
}
">
<span class="chat-msg__heading">
${
(
this
.
is_me_message
)
?
html
`
...
...
@@ -165,6 +165,10 @@ class Message extends CustomElement {
</div>`
;
}
shouldShowAvatar
()
{
return
api
.
settings
.
get
(
'
show_message_avatar
'
)
&&
!
this
.
is_me_message
&&
this
.
type
!==
'
headline
'
;
}
getAvatarData
()
{
const
image_type
=
this
.
model
.
vcard
.
get
(
'
image_type
'
);
const
image_data
=
this
.
model
.
vcard
.
get
(
'
image
'
);
...
...
src/converse-chatview.js
View file @
7b0e9df4
...
...
@@ -56,6 +56,7 @@ converse.plugins.add('converse-chatview', {
'
message_limit
'
:
0
,
'
muc_hats_from_vcard
'
:
false
,
'
show_images_inline
'
:
true
,
'
show_message_avatar
'
:
true
,
'
show_retraction_warning
'
:
true
,
'
show_send_button
'
:
true
,
'
show_toolbar
'
:
true
,
...
...
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