Browse Source

confirmations

hosting-provider
Evan Feenstra 5 years ago
parent
commit
69339392a9
  1. 13
      api/network/send.ts
  2. 14
      dist/api/network/send.js
  3. 2
      dist/api/network/send.js.map

13
api/network/send.ts

@ -31,14 +31,13 @@ export async function sendMessage(params) {
let isTribeOwner = false
const chatUUID = chat.uuid
if(isTribe) {
// if(type===constants.message_types.confirmation) {
// return // dont send confs for tribe
// }
console.log("is tribe!")
const tribeOwnerPubKey = chat.ownerPubkey
if(sender.publicKey===tribeOwnerPubKey){
console.log('im owner! mqtt!')
isTribeOwner = true
isTribeOwner = sender.publicKey===tribeOwnerPubKey
if(type===constants.message_types.confirmation) {
// if u are owner, go ahead!
if(!isTribeOwner) return // dont send confs for tribe if not owner
}
if(isTribeOwner){
networkType = 'mqtt' // broadcast to all
// decrypt message.content and message.mediaKey w groupKey
msg = await decryptMessage(msg, chat)

14
dist/api/network/send.js

@ -37,14 +37,14 @@ function sendMessage(params) {
let isTribeOwner = false;
const chatUUID = chat.uuid;
if (isTribe) {
// if(type===constants.message_types.confirmation) {
// return // dont send confs for tribe
// }
console.log("is tribe!");
const tribeOwnerPubKey = chat.ownerPubkey;
if (sender.publicKey === tribeOwnerPubKey) {
console.log('im owner! mqtt!');
isTribeOwner = true;
isTribeOwner = sender.publicKey === tribeOwnerPubKey;
if (type === constants.message_types.confirmation) {
// if u are owner, go ahead!
if (!isTribeOwner)
return; // dont send confs for tribe if not owner
}
if (isTribeOwner) {
networkType = 'mqtt'; // broadcast to all
// decrypt message.content and message.mediaKey w groupKey
msg = yield msg_1.decryptMessage(msg, chat);

2
dist/api/network/send.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save