Commit 98f6ea8a authored by JC Brand's avatar JC Brand

Merge pull request #428 from thierrytiti/chat-with-pending

Enhancement #394 Option to allow chatting with pending contacts
parents 0c67d211 479bab2c
......@@ -303,6 +303,7 @@
// Default configuration values
// ----------------------------
this.default_settings = {
allow_chat_pending_contacts: false,
allow_contact_removal: true,
allow_contact_requests: true,
allow_dragresize: true,
......@@ -3879,7 +3880,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) {
......@@ -3887,7 +3889,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