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
c002600a
Commit
c002600a
authored
Nov 25, 2020
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename `update_title` setting to `show_tab_notifications`
parent
fb316ff0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
19 deletions
+20
-19
CHANGES.md
CHANGES.md
+1
-1
docs/source/configuration.rst
docs/source/configuration.rst
+8
-7
spec/notification.js
spec/notification.js
+2
-2
src/converse-notification.js
src/converse-notification.js
+9
-9
No files found.
CHANGES.md
View file @
c002600a
...
...
@@ -3,7 +3,7 @@
## 8.0.0 (Unreleased)
-
#1083: Add support for XEP-0393 Message Styling
-
New configuration setting:
[
](
https://conversejs.org/docs/html/configuration.html#trusted
)
instead.
-
New configuration setting:
[
show_tab_notifications
](
https://conversejs.org/docs/html/configuration.html#show-tab-notifications
)
### Breaking Changes
...
...
docs/source/configuration.rst
View file @
c002600a
...
...
@@ -1833,6 +1833,14 @@ Adds a button to the chat which can be clicked or tapped in order to send the
message.
show_tab_notifications
----------------------
* Default: ``true``
Determines whether an unread messages counter is shown in the tab.
singleton
---------
...
...
@@ -1961,13 +1969,6 @@ Converse render the emojis with `Twemoji <https://twemoji.twitter.com/>`_.
See also `emoji_image_path`_.
update_title
------------
* Default: ``true``
Determines whether to shows unread messages counter in the page title.
visible_toolbar_buttons
-----------------------
...
...
spec/notification.js
View file @
c002600a
...
...
@@ -228,7 +228,7 @@ describe("Notifications", function () {
it
(
"
is incremented when the message is received and the window is not focused
"
,
mock
.
initConverse
(
[
'
rosterGroupsFetched
'
],
{
'
update_title
'
:
false
},
[
'
rosterGroupsFetched
'
],
{
'
show_tab_notifications
'
:
false
},
async
function
(
done
,
_converse
)
{
await
mock
.
waitForRoster
(
_converse
,
'
current
'
);
...
...
@@ -255,7 +255,7 @@ describe("Notifications", function () {
expect
(
favico
.
badge
.
calls
.
count
()).
toBe
(
0
);
_converse
.
api
.
settings
.
set
(
'
update_title
'
,
true
);
_converse
.
api
.
settings
.
set
(
'
show_tab_notifications
'
,
true
);
const
msg2
=
$msg
({
from
:
sender_jid
,
to
:
_converse
.
connection
.
jid
,
...
...
src/converse-notification.js
View file @
c002600a
...
...
@@ -17,7 +17,7 @@ converse.env.Favico = Favico;
let
favicon
;
function
updateUnreadFavicon
()
{
if
(
api
.
settings
.
get
(
'
update_title
'
))
{
if
(
api
.
settings
.
get
(
'
show_tab_notifications
'
))
{
favicon
=
favicon
??
new
converse
.
env
.
Favico
({
type
:
'
circle
'
,
animation
:
'
pop
'
});
const
chats
=
_converse
.
chatboxes
.
models
;
const
num_unread
=
chats
.
reduce
((
acc
,
chat
)
=>
(
acc
+
(
chat
.
get
(
'
num_unread
'
)
||
0
)),
0
);
...
...
@@ -36,17 +36,17 @@ converse.plugins.add('converse-notification', {
*/
api
.
settings
.
extend
({
update_title
:
true
,
notify_all_room_messages
:
false
,
show_desktop_notifications
:
true
,
show_chat_state_notifications
:
false
,
chatstate_notification_blacklist
:
[],
// ^ a list of JIDs to ignore concerning chat state notifications
chatstate_notification_blacklist
:
[],
notification_delay
:
5000
,
notification_icon
:
'
logo/conversejs-filled.svg
'
,
notify_all_room_messages
:
false
,
notify_nicknames_without_references
:
false
,
play_sounds
:
true
,
show_chat_state_notifications
:
false
,
show_desktop_notifications
:
true
,
show_tab_notifications
:
true
,
sounds_path
:
api
.
settings
.
get
(
"
assets_path
"
)
+
'
/sounds/
'
,
notification_icon
:
'
logo/conversejs-filled.svg
'
,
notification_delay
:
5000
,
notify_nicknames_without_references
:
false
});
/**
...
...
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