mirror of
https://github.com/status-im/status-go.git
synced 2025-02-06 11:56:01 +00:00
Updated Whisper Push Notifications (markdown)
parent
46e5912edd
commit
6fa6fc82fc
@ -182,8 +182,9 @@ var newChatSessionTopic = '0x509579a2'; // NEW_CHAT_SESSION
|
||||
var ackNewChatSessionTopic = '0xd012aae8'; // ACK_NEW_CHAT_SESSION
|
||||
var createChatSession = function (subscriptionKey) {
|
||||
var chatId = '0xdeadbeef';
|
||||
|
||||
// subscriptionKey is key shared by server that allows us to communicate with server privately
|
||||
var keyname = 'SUBSCRIPTION_KEY';
|
||||
var keyname = 'SUBSCRIPTION_KEY'; // you might want to be tad more creative
|
||||
web3.shh.deleteSymKey(keyname);
|
||||
web3.shh.addSymKey(keyname, subscriptionKey);
|
||||
|
||||
@ -208,8 +209,8 @@ var createChatSession = function (subscriptionKey) {
|
||||
// 1. register our device with that chat
|
||||
// 2. share that key with others, so that they can register themselves
|
||||
// 3. use chat key to trigger notifications
|
||||
registerDevice(payload.key);
|
||||
shareChatKey(payload.key);
|
||||
registerDevice(chatId, payload.key);
|
||||
shareChatKey(chatId, payload.key);
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user