Commit 479bab2c authored by thierrytiti's avatar thierrytiti

Enhancement #394 Option to allow chatting with pending contacts

parent 785244f1
......@@ -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();
......
......@@ -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]
......
......@@ -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
---------------------
......
{[ 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>
{[ 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>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment