BuddyBoss Home – Web Support Forums Plugins BuddyBoss Inbox Inbox issue sends message to many users

Viewing 13 posts - 1 through 13 (of 13 total)
  • Question

    #57259
    @nvwa

    Hi –

    Major issue with inbox- if i select Send To (Username or Friend’s Name) and select a common name like “Linda” it will show a result for all Lindas in the the database, I then select the specific Linda I want to send a message to It shows as sent to that person however, it ends up sending it to ALL Lindas in the database. This is a MAJOR issue and basically makes it unusable.

    Please advise

    Answers

    #57474
    @nvwa

    REPOSTING BECAUSE SO ANSWER RECEIVED!
    Hi –

    Major issue with inbox- if i select Send To (Username or Friend’s Name) and select a common name like “Linda” it will show a result for all Lindas in the the database, I then select the specific Linda I want to send a message to It shows as sent to that person however, it ends up sending it to ALL Lindas in the database. This is a MAJOR issue and basically makes it unusable.

    Please advise

    #57639
    @vapvarun

    Hi @nvwa, Sorry for delayed response
    I have notified developers about it, it will be fixed shortly
    Regards
    Varun Dubey

    #57831
    @nvwa

    Is there an ETA on a fix? This issue basically makes the plugin useless!

    #58012
    @vapvarun

    Hi @nvwa, I have already added it at high priority it should be fixed within a week.

    Regards
    Varun Dubey

    #58462
    @schwarzaufweiss

    I have just purchased and installed “Inbox”. What’s the status of this bug?!?

    #62622
    @nvwa

    Yes, What is the status?

    #63030
    @vapvarun

    Hi @nvwa
    This bug has been sent to the developers but is still pending, I will ping them again.
    Regards
    Varun Dubey

    #64994
    @vapvarun

    Hi @nvwa @schwarzaufweiss
    It is BuddyPress bug. We have submitted it to BuddyPress to fix it. https://buddypress.trac.wordpress.org/ticket/6980
    Regards
    Varun Dubey

    #69823
    @ricochetsupport

    Despite this being an issue with Buddypress itself, can BuddyBoss address it? It’s a major issue and there’s been zero activity on that buddypress ticket… We might have to wait a very long time for them.

    #70974
    @ricochetsupport

    This works for us. It does two things: 1. search all users not just friends 2. clear input field after you select from autosuggest list.

    I’ll put it here in case it helps anyone else. No promises, though!

    if(function_exists("bp_is_messages_component")) {
           define( 'BP_MESSAGES_AUTOCOMPLETE_ALL', false );
          $current_url = bp_get_requested_url();
    
          if (strpos($current_url, 'compose') > 0) {
    
    				// Include the autocomplete JS for composing a message.
    
              remove_action( 'wp_head', 'messages_autocomplete_init_jsblock' );
    					add_action( 'wp_head','messages_autocomplete_init_jsblock_custom',99,0);
    			}
    }
    
    function messages_autocomplete_init_jsblock_custom() {
    
    			?>
    
    			<script type="text/javascript">
    					window.user_profiles = Array();
    						jQuery(document).ready(function() {
                   var obj = jQuery(".send-to-input").autocomplete({
    									   source: function(request, response) {
    											   jQuery("body").data("ac-item-p","even");
    											   var term = request.term;
    											   if (term in window.user_profiles) {
    													   response(window.user_profiles[term]);
    													   return;
    											   }
    											   var data = {
    													   'action': 'messages_autocomplete_results',
    													   'search_term': request.term
    											   };
    											   jQuery.ajax({
    													   url: ajaxurl + '?q=' + request.term + '&limit=10',
    													   data: data,
    													   success: function(data) {
    															   var new_data = Array();
    															   d = data.split("\n");
    															   jQuery.each(d, function(i, item) {
    																	   new_data[new_data.length] = item;
    															   });
    															   if (data != "") {
    																	response(new_data);
    															   }
    													   }
    											   });
    									   },
    									   minLength: 1,
    									   select: function(event, ui) {
    											   sel_item = ui.item;
    											   var d = String(sel_item.label).split(' (');
    											   var un = d[1].substr(0, d[1].length - 1);
    											   //check if it already exists;
    											   if (0 === jQuery('.acfb-holder').find('#un-' + un).length) {
    													   var ln = '#link-' + un;
    													   var l = jQuery(ln).attr('href');
    													   var v = '<li class="selected-user friend-tab" id="un-' + un + '"><span><a href="' + l + '">' + d[0] + '</a></span> <span class="p">X</span></li>';
    													   if (jQuery(".acfb-holder").find(".friend-tab").length == 0) {
    															   var x = jQuery('.acfb-holder').prepend(v);
    													   } else {
    															   var x = jQuery('.acfb-holder').find(".friend-tab").last().after(v);
    													   }
    													   jQuery('#send-to-usernames').addClass(un);
                                 jQuery("#send-to-input").val("");
    											   }
    											   return false;
    									   },
    									   focus: function(event, ui) {
    											   jQuery(".ui-autocomplete li").removeClass("ui-state-hover");
    											   jQuery(".ui-autocomplete").find("li:has(a.ui-state-focus)").addClass("ui-state-hover");
    											   return false;
    									   }
    							   });
    
                                   obj.data("ui-autocomplete")._renderItem = function(ul, item) {
    									   ul.addClass("ac_results");
    									   if (jQuery("body").data("ac-item-p") == "even"){
    											c = "ac_event";
    											jQuery("body").data("ac-item-p","odd");
    										} else {
    											c = "ac_odd";
    											jQuery("body").data("ac-item-p","even");
    										}
    									   return jQuery("<li class='"+c+"'>").append("<a>" + item.label + "</a>").appendTo(ul);
    							   };
    
                                    obj.data("ui-autocomplete")._resizeMenu = function () {
                                        var ul = this.menu.element;
                                        ul.outerWidth(this.element.outerWidth());
                                    };
    
    							   jQuery(document).on("click", ".selected-user", function() {
    									   jQuery(this).remove();
    							   });
    							   jQuery('#send_message_form').submit(function() {
    									   tosend = Array();
    									   jQuery(".acfb-holder").find(".friend-tab").each(function(i, item) {
    											   un = jQuery(this).attr("id");
    											   un = un.replace('un-', '');
    											   tosend[tosend.length] = un;
    									   });
    									   document.getElementById('send-to-usernames').value = tosend.join(" ");
    							   });
    						});
    			</script>
    
    			<?php
    		}
    
    #71494

    @ricochetsupport, where do you put this code? functions.php or somewhere else?

    #71495
    @ricochetsupport

    @davejay Yes, you could put it in the functions.php file of your child theme, or in the bp-custom.php file in your plugins folder. If you’re not aware, you can create a file called bp-custom.php and put it in your plugins folder and it will be used only if buddypress is active. You can put any buddypress-related code in it. Useful for keeping things organized.

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this question.