Description Usage Arguments Details Value Examples
View source: R/send_rocket_message.R
send_rocket_message
Uses the users ID and Token to communicate with Rocket.chat server and send messages to specific groups, users or channels
1 | send_rocket_message(url, user_id, auth_token, receiver, message)
|
url |
The url of the rocket.chat server (has to be complete, with http or https). |
user_id |
The users ID retrieved from 'get_rocket_credentials'. |
auth_token |
The users authentication Token retrieved from 'get_rocket_credentials'. |
receiver |
The receiver of the message (if user mentioned with '@', otherwise use '#') |
message |
A text string containing the text to be sent |
This function connects with the Rocket.chat with users ID and Token and send a text message to a receiver.
To send a message to specific user, is essential to use the '@' before the user name. To send a message to groups or channels, you should use '#'
This function has no return since it posts the message to the server
1 2 3 4 5 6 7 8 | ## Not run:
send_rocket_message(url = 'http://localhost:8000/',
user_id = '<ROCKET_USER_ID>',
auth_token = '<ROCKET_USER_AUTH_TOKEN>',
receiver = '#general',
message = 'hello')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.