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
479bab2c
Commit
479bab2c
authored
Jun 18, 2015
by
thierrytiti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enhancement #394 Option to allow chatting with pending contacts
parent
785244f1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
3 deletions
+27
-3
converse.js
converse.js
+5
-2
docs/CHANGES.rst
docs/CHANGES.rst
+1
-0
docs/source/configuration.rst
docs/source/configuration.rst
+7
-0
src/templates/pending_contact.html
src/templates/pending_contact.html
+8
-1
src/templates/requesting_contact.html
src/templates/requesting_contact.html
+6
-0
No files found.
converse.js
View file @
479bab2c
...
...
@@ -275,6 +275,7 @@
// Default configuration values
// ----------------------------
this
.
default_settings
=
{
allow_chat_pending_contacts
:
false
,
allow_contact_removal
:
true
,
allow_contact_requests
:
true
,
allow_dragresize
:
true
,
...
...
@@ -3855,7 +3856,8 @@
this
.
$el
.
addClass
(
'
pending-xmpp-contact
'
);
this
.
$el
.
html
(
converse
.
templates
.
pending_contact
(
_
.
extend
(
item
.
toJSON
(),
{
'
desc_remove
'
:
__
(
'
Click to remove this contact
'
)
'
desc_remove
'
:
__
(
'
Click to remove this contact
'
),
'
allow_chat_pending_contacts
'
:
converse
.
allow_chat_pending_contacts
})
));
}
else
if
(
requesting
===
true
)
{
...
...
@@ -3863,7 +3865,8 @@
this
.
$el
.
html
(
converse
.
templates
.
requesting_contact
(
_
.
extend
(
item
.
toJSON
(),
{
'
desc_accept
'
:
__
(
"
Click to accept this contact request
"
),
'
desc_decline
'
:
__
(
"
Click to decline this contact request
"
)
'
desc_decline
'
:
__
(
"
Click to decline this contact request
"
),
'
allow_chat_pending_contacts
'
:
converse
.
allow_chat_pending_contacts
})
));
converse
.
controlboxtoggle
.
showControlBox
();
...
...
docs/CHANGES.rst
View file @
479bab2c
...
...
@@ -6,6 +6,7 @@ Changelog
* #144 Add Ping funcionnality and Pong Handler [thierrytiti]
* #389 Allow login panel placeholders and roster item 'Name' translations. [gbonvehi]
* #394 Option to allow chatting with pending contacts [thierrytiti]
* #396 Add automatic Away mode and XEP-0352 support [thierrytiti]
* #400, #410 Allow offline pretty status and placeholder for "Insert a smiley" to be translated [thierrytiti]
* #401 Updated French translation [thierrytiti]
...
...
docs/source/configuration.rst
View file @
479bab2c
...
...
@@ -98,6 +98,13 @@ Here's an example of converse.js being initialized with these three options:
});
allow_chat_pending_contacts
---------------------------
* Default: ``false``
Allow the user to chat with pending contacts.
allow_contact_removal
---------------------
...
...
src/templates/pending_contact.html
View file @
479bab2c
{[ if (allow_chat_pending_contacts) { ]}
<a
class=
"open-chat"
href=
"#"
>
{[ } ]}
<span
class=
"pending-contact-name"
title=
"Name: {{fullname}}
JID: {{jid}}"
>
{{fullname}}
</span>
<a
class=
"remove-xmpp-contact icon-remove"
title=
"{{desc_remove}}"
href=
"#"
></a>
JID: {{jid}}"
>
{{fullname}}
</span>
{[ if (allow_chat_pending_contacts) { ]}
</a>
{[ } ]}
<a
class=
"remove-xmpp-contact icon-remove"
title=
"{{desc_remove}}"
href=
"#"
></a>
src/templates/requesting_contact.html
View file @
479bab2c
{[ if (allow_chat_pending_contacts) { ]}
<a
class=
"open-chat"
href=
"#"
>
{[ } ]}
<span
class=
"req-contact-name"
title=
"Name: {{fullname}}
JID: {{jid}}"
>
{{fullname}}
</span>
{[ if (allow_chat_pending_contacts) { ]}
</a>
{[ } ]}
<span
class=
"request-actions"
>
<a
class=
"accept-xmpp-request icon-checkmark"
title=
"{{desc_accept}}"
href=
"#"
></a>
<a
class=
"decline-xmpp-request icon-close"
title=
"{{desc_decline}}"
href=
"#"
></a>
...
...
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