An extra measure to prevent duplicate connections. Need to audit the boot process some more.
When a user replies to a non-BuddyPress topic, we need to explicitly tell bbPress to keep the topic subscription for the user. Otherwise, the user will be unsubscribed after posting by email. This commit sets the $_POST['bbp_topic_subscription'] flag so bbPress see this. This is due to how bbp_update_reply() works. See #24.
The latest release of bbPress (tested with v2.5.4) fixes some issues relating to the post link, which was holding up enabling this feature. See #24.
…Mandrill and sending a failure feedback message to the sender. Mandrill uses an object for its email headers, while RBE's internal IMAP class uses an array for its headers. Since the get_header() method only looked for an array, this caused a "Cannot use object of type stdClass as array" fatal error. This commit type casts the $headers parameter so it is always an array, which fixes this problem.
… is the same as the username. Fixes issues when switching from a non-Gmail IMAP account back to GMail. See #57.
PHP doesn't support abstract static methods. No worry, let's just remove the static keyword.
Makes life easier for plugin developers.
Querying the database to check for a lock is too slow and led to race conditions where duplicate IMAP connections could occur. Accessing the filesystem is better, but not 100% foolproof. WP-cron suffers from the same problem. In my testing, the filesystem can handle up to 12 concurrent page loads on the same second without launching a duplicate connection. This rarely happens unless your site experiences a ton of traffic. The filesystem method can be overriden by redeclaring these functions in a plugin: - bp_rbe_is_connecting() - bp_rbe_add_imap_lock() - bp_rbe_remove_imap_lock() - bp_rbe_stop_imap() - bp_rbe_should_stop() Handy if you wanted to use something faster like memcached or shared memory. See #16.
This reverts commit bce67d5.
RBE now supports two modes, however for those that were using RBE prior to this, we need to set the mode to 'imap' to ensure the admin doesn't have to visit the RBE settings page and resave the settings. This occurs during plugin activation. So RBE needs to be deactivated and reactivated for this to take effect.
This will allow proper email threading to occur in email clients that support it. To prepare the "Message-ID" header, a new listener property - "reply_to_id" - is added to determine the uniqueness of the outgoing email. The "reply_to_id" is generally the post ID of whatever is creating the email. See #49.
Using the $bp_rbe global is not reliable. Instead, wipe out the RBE email querystring. When the email querystring is empty, RBE's email filter does not take effect.
BuddyPress 2.0 introduced a new feature to dynamically format the activity action in the loop at runtime. This meant that the "via email" string for activity comments needed to be reapplied at runtime. This commit addresses this.