*

Brandso

  • ****
  • 108 posts
Instant Messenger Bugs
« on: May 18, 2022, 09:26:18 AM »
Hi,
I was testing how users can block another user from messaging them. So, I posted a new listing from 1st demo user. Then I created 2nd demo user but didn't verify the mobile number for 2nd demo user because I also wanted to test how the instant messenger will work when a un-verified mobile user contacts Listing owner through Item Details page Contact Seller form. So, the message sent by 2nd user from contact seller form was delivered to listing owner (1st user). Then the listing user (1st user) blocked 2nd user messages. Now since my 2nd demo user had not verified the mobile number the only option for him to contact the listing owner again was through the Item Details page contact seller form, so I sent a new message to listing owner (1st user) but this time since the listing owner had blocked me 2nd user got an error message saying that he was blocked (It's okay till here). Now when I checked listing owner (1st user) message inbox there a new message was created with a time stamp 5 hours ago and the message was blank. So the problem is that when someone blocks another person they will expect not to get any message from that person, but when the message is sent through Listing page contact form it sends an empty message as many time a block user sends any message to the listing owner.

It works fine when the blocked user tries to chat with instant messenger because I also tried to send message through instant messenger after verifying 2nd demo user.
« Last Edit: May 18, 2022, 09:28:09 AM by Brandso »

*

MB Themes

Re: Instant Messenger Bugs
« Reply #1 on: May 18, 2022, 09:47:16 AM »
@Brandso
You should use much simpler explaining of problems, got absolutely lost after 2 line.
I think there is no need to write stories, just create list how to reproduce issue.
Mobile phone verification is not functionality used in instant messenger.
I recommend to synchronize database time and PHP time as it seems you have gap there.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Brandso

  • ****
  • 108 posts
Re: Instant Messenger Bugs
« Reply #2 on: May 18, 2022, 10:17:17 AM »
Okay in simple words block user doesn't work when the blocked user try to contact listing owner via contact seller form. As you can see in shared image the 2 messages with 0 replies was created when blocked user tried contacting listing owner.

*

Brandso

  • ****
  • 108 posts
Re: Instant Messenger Bugs
« Reply #3 on: May 18, 2022, 10:32:50 AM »
Okay so I got a temporary fix for my problem. I just removed the contact block from item.php file and now its working how it should work.

*

Brandso

  • ****
  • 108 posts
Re: Instant Messenger Bugs
« Reply #4 on: May 18, 2022, 10:50:22 AM »
Just an update.
Removing the contact block will only fix the block user problem but when we send message from "Send message to seller" it doesn't have a predefined message that refers the Item. And if the seller has multiple listing then it will be hard for them to understand that the message is regarding which listing.

*

MB Themes

Re: Instant Messenger Bugs
« Reply #5 on: May 18, 2022, 11:13:53 AM »
in index.php of plugin, around line 229 is this code:
Code: [Select]
    $to_user_id = $item['fk_i_user_id'];
    $to_user_name = $item['s_contact_name'];
    $to_user_email = $item['s_contact_email'];

bellow it, add following:
Code: [Select]
    // CHECK FOR BLOCK
    if(im_check_block($to_user_id, $from_user_email) == 0) {
      //osc_add_flash_error_message( __('You cannot message this user. This user has blocked communication with you.', 'instant_messenger'));
      header('Location: ' . osc_item_url_from_item($item));
      exit;
    }

Right now, block check is done when sending messages, but in this case it should be also before user create thread.
Fixed in latest version.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Brandso

  • ****
  • 108 posts
Re: Instant Messenger Bugs
« Reply #6 on: May 18, 2022, 02:10:58 PM »
Hi, just updated the Instant Messenger and tested it all again and now its working perfectly. Thanks for your time & support

*

MB Themes

Re: Instant Messenger Bugs
« Reply #7 on: May 18, 2022, 03:32:05 PM »
Glad to hear that ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots