• Resolved levhav

    (@levhav)


    Hi,
    I want to integrate this plugin with my private chat messages system,

    Can I use this plugin for sending custom personal push messages?
    Do you have some PHP API or callback to send custom messages for only one subscribed user?

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Rowinson Gallego

    (@rwngallego)

    Hello, currently it’s not possible to have external plugin integrations, but it’s a good idea and we may consider doing it. However, sending a notification to a specific user is currently not supported. Have in mind that Push API only works for certain browsers, so the specific users may loose functionality if they switch let’s say from a supported browser to an iPhone.

    Plugin Author Rowinson Gallego

    (@rwngallego)

    I’ve created an issue in GitHub: https://github.com/rwngallego/perfecty-push-wp/issues/5

    Thread Starter levhav

    (@levhav)

    Thanks, I will subscribe on Github.

    Plugin Author Perfecty

    (@perfecty)

    This has been released in v1.2.0

    Hi @rwngallego I just got acquainted with your plugin. Everything is great but I can’t find this feature? I use version 1.2.2.

    Plugin Author Perfecty

    (@perfecty)

    Hi @huongcba, thanks for contacting us.

    Do you have some PHP API or callback to send custom messages for only one subscribed user?

    You can now send notifications using the Perfecty_Push_Integration::notify() method, which is defined as:

    
    	 /**
    	 * Send one notification to the WordPress user specified by $user_id
    	 *
    	 * @param int    $user_id WordPress User Id
    	 * @param string $message Message to be sent
    	 * @param string $title Title of the message (default: site name)
    	 * @param string $image_url Url of the image to show (default: none)
    	 * @param string $url_to_open Url to open (default: site url)
    	 * @return array Array with [total, succeeded]
    	 * @throws ErrorException
    	 * @since 1.2.0
    	 */
    	public function notify( $user_id, $message, $title = '', $image_url = '', $url_to_open = '' ) {
    		$payload = Perfecty_Push_Lib_Payload::build( $message, $title, $image_url, $url_to_open );
    		return Perfecty_Push_Lib_Push_Server::notify( $user_id, $payload );
    	}`
    

    Thank you very much! @perfecty

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Can I use this plugin for sending custom personal push messages?’ is closed to new replies.