-
Notifications
You must be signed in to change notification settings - Fork 83
Develop #532
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
Merged
Merged
Develop #532
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
185d30c
Updated Front End
b84ee9a
Update
a2e5bd7
Merge pull request #527 from ShaneIsrael/develop
ShaneIsrael cca2f7c
Merge branch 'main' into develop
da7fd39
functioning webhook test
162e5ad
Save json payload to backend config
2b3a2ca
added ENV options for discord and webhook | validation on init.py
f3ea22a
added means to add integrations to config.json from init.py
8b907ed
Added test dicord webhook functionality
97ef030
Cleaned up GUI | clean up files
0a933a7
removed test ENVs
7e15a67
Added Regex validation in settings.js to check for valid URL for gene…
9296d5e
cleaned up code / removed comments
fb4084b
Added integration info cli.py for scanning to send generic_webook | A…
eff62ef
Updated Docs
theotherguy2175 3aabf02
Updated Docs | Readme.md
ceb9173
Removed Temp file
3a08801
Migrated Notifications Docs to seperate MD file
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| ## Notifications | ||
| Firesahre has a limited setup for notifications when a new video is uploaded. Primarily Discord and a Generic Webhook. Since Gaming and Discord is so ubiquitous it makes sense to have a dedicated Discord channel just for clip highlights to share with your friends. For this reason there is the Discord integration, to notify a channel when a new video has been uploaded. A similar premise has been made for the Generic Webhook. There are many notification systems, and to program them all would be an undertaking, so with the Generic Webhook, this allows what should be a means to still notify any system that can take a HTTP-POST and a JSON payload for webhooks. | ||
| ### Discord | ||
| The Discord Notification integration is very simple, you just add the webhook URL to the channel you want it to be send to. You can learn how to generate a webhook URL for your Discord server and channel here: [Discord - Webhook Documentation](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) | ||
|
|
||
| Docker ENV example: | ||
|
|
||
| `DISCORD_WEBHOOK_URL='https://discord.com/api/webhooks/123456789/abcdefghijklmnopqrstuvwxyz'` | ||
|
|
||
| ### Generic Webhook | ||
| For any other service you would want to send a notification to, that also supports a generic JSON payload-based webhook. Please note, you will have to set not only the POST URL but also the JSON Payload. If you do not know what this is you can learn more here: | ||
|
|
||
| Basically, you will need to enter valid JSON data into the "Generic Webhook JSON Payload" box on the integrations page, with the JSON payload that will work for your specific app or service. Please consult the webhook documentation for the service you are wanting to use, if they offer webhook support. For instance, the JSON data could look something like the following: | ||
|
|
||
| ``` | ||
| { | ||
| "Title": "Fireshare", | ||
| "message": "New Video Uploaded to Fireshare", | ||
| } | ||
| ``` | ||
|
|
||
| There is one variable avaliable that can be used in the JSON payload that can inject the video perma link. This could be useful that when you see the notification on your service you have a direct link to this new video. This can be achived using this exact format anywhere it makes sense: `[video_url]` | ||
|
|
||
| Example: | ||
| ``` | ||
| { | ||
| "Title": "Fireshare", | ||
| "message": "New Video Uploaded to Fireshare [video_url]", | ||
| } | ||
| ``` | ||
| What this will look like send to your service as a json payload: | ||
|
|
||
| ``` | ||
| { | ||
| "Title": "Fireshare", | ||
| "message": "New Video Uploaded to Fireshare https://yourdomain.com/w/c415d34530d15b2892fa4a4e037b6c05", | ||
| } | ||
| ``` | ||
|
|
||
| **Syntax Note** | ||
|
|
||
| Please keep in mind that the json payload is not a simple string, it has key/value pairs that have string in it. This means these strings are usually wrapped in either single quotes `'` or double `"`. Meaning if you are just pasting your json via the gui, just pick one and fireshare will take care of the rest. However for Docker ENVs you need to make sure you are choosing one for the total encapuslation of the json, and then another for the actual internal json strings. | ||
|
|
||
| Example: | ||
|
|
||
| ``` | ||
| GENERIC_WEBHOOK_PAYLOAD='{"Title": "Fireshare", "message": "New Video Uploaded to Fireshare [video_url]"}' | ||
| #Notice this is a sinlge line ^ | ||
| ``` | ||
|
|
||
|
|
||
| **Full Docker ENV example:** | ||
|
|
||
| ``` | ||
| GENERIC_WEBHOOK_URL='https://webhook.com/at/endpoint12345' | ||
| GENERIC_WEBHOOK_PAYLOAD='{"Title": "Fireshare", "message": "New Video Uploaded to Fireshare [video_url]"}' | ||
| # You must have both ENVs filled in for Generic Webhook to work | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.