Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README.md documentation to send to multiple users is un-necessarily complicated #34

Open
saltyzoo opened this issue Jun 29, 2023 · 2 comments

Comments

@saltyzoo
Copy link

The following works just fine to send to multiple users and is a one-line modification of the general "Sending a Message" example, rather than an unneeded loop:

var Push = require( 'pushover-notifications' )

var p = new Push( {
user: 'token1, token2, token3',
token: process.env['PUSHOVER_TOKEN'],
// httpOptions: {
// proxy: process.env['http_proxy'],
//},
// onerror: function(error) {},
// update_sounds: true // update the list of sounds every day - will
// prevent app from exiting.
})

var msg = {
// These values correspond to the parameters detailed on https://pushover.net/api
// 'message' is required. All other values are optional.
message: 'omg node test', // required
title: "Well - this is fantastic",
sound: 'magic',
device: 'devicename',
priority: 1
}

p.send( msg, function( err, result ) {
if ( err ) {
throw err
}

console.log( result )
})

@qbit
Copy link
Owner

qbit commented Jun 29, 2023

Hi @saltyzoo, it's hard to tell what changed from the block of text, can you submit a PR? or maybe edit your message to be a diff?

@saltyzoo
Copy link
Author

I'm new to this editor, and it's just not revealing to me a way to make it obvious. lol

It's this line:

user: 'token1, token2, token3',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants