git ssb

16+

Dominic / patchbay



Commit 1142ba9b914b1fd19b2b8816d4f7496a264abe5a

if a message was private, but without recps, pick a reasonable default: sender + receiver.

Dominic Tarr committed on 10/15/2016, 6:21:10 PM
Parent: 0130f94de3e3c309fedf1f4ef5c26e6ea20d2bab

Files changed

modules/thread.jschanged
modules/thread.jsView
@@ -5,8 +5,9 @@
55 var ref = require('ssb-ref')
66 var h = require('hyperscript')
77 var u = require('../util')
88 var Scroller = require('pull-scroll')
9 +var self_id = require('../keys').id
910
1011 function once (cont) {
1112 var ended = false
1213 return function (abort, cb) {
@@ -98,14 +99,22 @@
9899 meta.root = thread[0].value.content.root || thread[0].key
99100 meta.channel = thread[0].value.content.channel
100101
101102 var recps = thread[0].value.content.recps
102- if(recps && thread[0].value.private)
103- meta.recps = recps
103 + var private = thread[0].value.private
104 + if(private) {
105 + if(recps)
106 + meta.recps = recps
107 + else
108 + meta.recps = [thread[0].value.author, self_id]
109 + }
104110 })
105111 }
106112
107113 loadThread()
108114 return div
109115 }
110116 }
111117
118 +
119 +
120 +

Built with git-ssb-web