Skip to:
Content

Changeset 11538


Ignore:
Timestamp:
04/27/17 03:36:27 (9 months ago)
Author:
r-a-y
Message:

Messages: Add better UX when attempting to view an invalid thread.

This commit adds a notice when attempting to view an invalid thread for
logged-in users.

See #7349.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-screens.php

    r11537 r11538  
    122122 
    123123    if ( empty( $thread_id ) || ! messages_is_valid_thread( $thread_id ) ) { 
     124        if ( is_user_logged_in() ) { 
     125            bp_core_add_message( __( 'The conversation you tried to access is no longer available', 'buddypress' ), 'error' ); 
     126        } 
     127 
    124128        bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() ) ); 
    125129    } 
     
    134138        // Redirect away. 
    135139        } else { 
    136             bp_core_add_message( __( 'You do not have access to that message thread.', 'buddypress' ), 'error' ); 
     140            bp_core_add_message( __( 'You do not have access to that conversation.', 'buddypress' ), 'error' ); 
    137141            bp_core_redirect( trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() ) ); 
    138142        } 
Note: See TracChangeset for help on using the changeset viewer.