Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Evanfeenstra committed Jul 1, 2020
1 parent a96ea5b commit e7d34f7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 14 deletions.
7 changes: 1 addition & 6 deletions api/controllers/confirmations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,7 @@ export async function tribeOwnerAutoConfirmation(msg_id,chat_uuid){
const message = await models.Message.findOne({ where:{id:msg_id} })
const chat = await models.Chat.findOne({where:{uuid:chat_uuid}})

if(message){
console.log('===>',message.type,constants.message_types.delete)
if(message.type===constants.message_types.delete){
return // dont auto confirm delete msg
}

if(message){
let statusMap = {}
try{
statusMap = JSON.parse(message.statusMap||'{}')
Expand Down
4 changes: 3 additions & 1 deletion api/network/send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export function signAndSend(opts, mqttTopic?:string, replayingHistory?:boolean){
data = data + sig

// console.log("ACTUALLY SEND", mqttTopic)
console.log("SEND ====>", opts.data)
try {
if(mqttTopic) {
await tribes.publish(mqttTopic, data, function(){
Expand All @@ -129,6 +128,9 @@ export function signAndSend(opts, mqttTopic?:string, replayingHistory?:boolean){

function checkIfAutoConfirm(data){
if(typesToForward.includes(data.type)){
if(data.type===constants.message_types.delete){
return // dont auto confirm delete msg
}
tribeOwnerAutoConfirmation(data.message.id, data.chat.uuid)
}
}
Expand Down
4 changes: 0 additions & 4 deletions dist/api/controllers/confirmations.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/api/controllers/confirmations.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion dist/api/network/send.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e7d34f7

Please sign in to comment.