igniterealtime / openfire-emailOnAway-plugin

The email on away plugin allows to forward messages to user's email address when the user is away (not offline)
3 stars 5 forks source link

Fix for #5 and #6 #7

Open guusdk opened 8 months ago

guusdk commented 8 months ago

This PR introduces a bit of basic maintenance, but also three properties that can be used to change the emails that are being sent by this plugin:

The plugin will try to look up the email address of senders and recipients of chat messages, but an email address can not always be found. The system property plugin.emailonaway.use_xmpp_as_email_address defines if the (bare) XMPP address of a user is to be used as an email address if no other address can be found. When configured to 'false', then the value from the system property plugin.emailonaway.email.default_mail_address will be used.

To implement the above, a refactoring has been implemented for the lookup of both the 'human name' as well as email address for an XMPP address.