Plugin Directory

Changeset 2781255


Ignore:
Timestamp:
09/07/2022 10:43:47 AM (4 years ago)
Author:
bahson
Message:

Update to version 1.0.5 from GitHub

Location:
flair-chat
Files:
6 added
6 deleted
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • flair-chat/tags/1.0.5/flair-chat.php

    r2779101 r2781255  
    195195            }
    196196
    197             $user_ids_placeholder = $this->array_items_query_placeholders($user_ids, '%d');
    198             $where_array = array();
    199             $where_array[] = $wpdb->prepare( "to_uid = %d", $current_uid );
    200             $where_array[] = $wpdb->prepare( "from_uid IN ($user_ids_placeholder)", $user_ids );
    201             $sql = "SELECT
     197            $unread_messages = null;
     198            if ( isset( $user_ids[0] ) ) {
     199                $user_ids_placeholder = $this->array_items_query_placeholders($user_ids, '%d');
     200                $where_array = array();
     201                $where_array[] = $wpdb->prepare( "to_uid = %d", $current_uid );
     202                $where_array[] = $wpdb->prepare( "from_uid IN ($user_ids_placeholder)", $user_ids );
     203                $sql = "SELECT
    202204                        message, from_uid, to_uid, is_read,
    203205                        COUNT(message)
     
    206208                        is_read = false AND";
    207209
    208             $sql .= ' ' . join( ' AND ', $where_array);
    209             $sql .= ' GROUP BY from_uid';
    210 
    211             $unread_messages = $wpdb->get_results( $sql );
     210                $sql .= ' ' . join( ' AND ', $where_array);
     211                $sql .= ' GROUP BY from_uid';
     212
     213                $unread_messages = $wpdb->get_results( $sql );
     214            }
    212215
    213216            if ( $unread_messages ) {
  • flair-chat/tags/1.0.5/readme.md

    r2779101 r2781255  
    55- Requires at least: 5.7
    66- Tested up to: 6.0
    7 - Stable tag: 1.0.4
     7- Stable tag: 1.0.5
    88- Requires PHP: 7.0
    99- License: GPLv2 or later
     
    3030   the form with the right information from step 2 above ie; app_id, key, secret and cluster.
    3131
    32 == Frequently Asked Questions ==
     32### SECTIONS
     33* [Frequently Asked Questions](https://wordpress.org/plugins/flair-chat/#faq)
    3334
    3435== Screenshots ==
     
    6465
    6566Downloaded the vendor items to be included in the 1.0.3 fix above.
     67
     68
     69= 1.0.5 =
     70
     71Fixed count unread issue, when no users were found.
  • flair-chat/tags/1.0.5/readme.txt

    r2779101 r2781255  
    55Requires at least: 5.7
    66Tested up to: 6.0
    7 Stable tag: 1.0.4
     7Stable tag: 1.0.5
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    4444== Frequently Asked Questions ==
    4545
     46= Are messages stored in a DB? Do you use websockets  or long polling? =
     47
     48Yeah, messages are stored in the DB, and communication to front end via [pusher api](https://pusher.com/) (I think they use we sockets under the hood).
     49
     50= Is it for admin & user/subscriber chat, or can any subscriber chat with this tool among them? I mean, a chat like FB chat? =
     51
     52With this release (1.0.0), anyone logged in can chat,  but I will add an input to select the roles to exclude from chat in the next minor release.
    4653
    4754== Changelog ==
     
    6673
    6774Downloaded the vendor items to be included in the 1.0.3 fix above.
     75
     76
     77= 1.0.5 =
     78
     79Fixed count unread issue, when no users were found.
  • flair-chat/trunk/flair-chat.php

    r2779101 r2781255  
    195195            }
    196196
    197             $user_ids_placeholder = $this->array_items_query_placeholders($user_ids, '%d');
    198             $where_array = array();
    199             $where_array[] = $wpdb->prepare( "to_uid = %d", $current_uid );
    200             $where_array[] = $wpdb->prepare( "from_uid IN ($user_ids_placeholder)", $user_ids );
    201             $sql = "SELECT
     197            $unread_messages = null;
     198            if ( isset( $user_ids[0] ) ) {
     199                $user_ids_placeholder = $this->array_items_query_placeholders($user_ids, '%d');
     200                $where_array = array();
     201                $where_array[] = $wpdb->prepare( "to_uid = %d", $current_uid );
     202                $where_array[] = $wpdb->prepare( "from_uid IN ($user_ids_placeholder)", $user_ids );
     203                $sql = "SELECT
    202204                        message, from_uid, to_uid, is_read,
    203205                        COUNT(message)
     
    206208                        is_read = false AND";
    207209
    208             $sql .= ' ' . join( ' AND ', $where_array);
    209             $sql .= ' GROUP BY from_uid';
    210 
    211             $unread_messages = $wpdb->get_results( $sql );
     210                $sql .= ' ' . join( ' AND ', $where_array);
     211                $sql .= ' GROUP BY from_uid';
     212
     213                $unread_messages = $wpdb->get_results( $sql );
     214            }
    212215
    213216            if ( $unread_messages ) {
  • flair-chat/trunk/readme.md

    r2779101 r2781255  
    55- Requires at least: 5.7
    66- Tested up to: 6.0
    7 - Stable tag: 1.0.4
     7- Stable tag: 1.0.5
    88- Requires PHP: 7.0
    99- License: GPLv2 or later
     
    3030   the form with the right information from step 2 above ie; app_id, key, secret and cluster.
    3131
    32 == Frequently Asked Questions ==
     32### SECTIONS
     33* [Frequently Asked Questions](https://wordpress.org/plugins/flair-chat/#faq)
    3334
    3435== Screenshots ==
     
    6465
    6566Downloaded the vendor items to be included in the 1.0.3 fix above.
     67
     68
     69= 1.0.5 =
     70
     71Fixed count unread issue, when no users were found.
  • flair-chat/trunk/readme.txt

    r2779101 r2781255  
    55Requires at least: 5.7
    66Tested up to: 6.0
    7 Stable tag: 1.0.4
     7Stable tag: 1.0.5
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    4444== Frequently Asked Questions ==
    4545
     46= Are messages stored in a DB? Do you use websockets  or long polling? =
     47
     48Yeah, messages are stored in the DB, and communication to front end via [pusher api](https://pusher.com/) (I think they use we sockets under the hood).
     49
     50= Is it for admin & user/subscriber chat, or can any subscriber chat with this tool among them? I mean, a chat like FB chat? =
     51
     52With this release (1.0.0), anyone logged in can chat,  but I will add an input to select the roles to exclude from chat in the next minor release.
    4653
    4754== Changelog ==
     
    6673
    6774Downloaded the vendor items to be included in the 1.0.3 fix above.
     75
     76
     77= 1.0.5 =
     78
     79Fixed count unread issue, when no users were found.
Note: See TracChangeset for help on using the changeset viewer.