Comments (3)
Hello!
I'm afraid we never did implement the push notification part. Everything you need is there, but it might be a little complicated to set up. I've added a page explaining how to send a notification through Pushkin here:
https://github.com/gdnmobilelab/pushkin-firebase/wiki/Sending-a-message
In this instance you will want to add some information to the webpush section of the POST request, to tell podmod what to do when it receives the message. That uses yet another library, worker-commands
:
https://github.com/alastaircoote/worker-commands
You would eventually get a payload that looks something like this:
fetch(`${PUSHKIN_HOST}/topics/TEST_TOPIC`, {
method: "POST",
headers: {
Authorization: ADMIN_KEY,
"Content-Type: "application/json"
},
body: JSON.stringify({
message: {
notification: {
title: "There is a new episode!",
body: "Maybe you'd like to listen to it?"
},
webpush: {
data: {
__isWorkerCommandPayload: true
},
notification: {
events: {
onclick: {
command: "client.open",
options: {
url: "https://URL_TO_NEW_EPISODE_HERE"
}
}
}
}
}
}
})
});
(I have not tested that, though!)
As for the code, we have frozen the gdnmobilelab repos so that they reflect the state of the lab on the day it shut down - maybe you could upload your fork to a different Github repo so that everyone can see it there?
from podmod.
from podmod.
Hey Alastair,
i forked the code and pushed what I developed.
The things developed served well for prototyping, now I would love to improve the code quality.
The project is great and I would love to test some more ideas publishing the code in a beta version - but being a beginner I dont really trust my code :D so if anyone more experienced feels like helping with some advice I would be immensely thankful!!!
from podmod.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from podmod.