Commit bea8c383ff7d998f95c37b59596b42b791d92b06
friends: add sync event to createFriendStream when live
Matt McKegg committed on 3/27/2017, 3:20:00 AMParent: 2fc86941bc8f1d882d194c5f0a27849528150914
Files changed
plugins/friends.js | changed |
plugins/friends.js | ||
---|---|---|
@@ -123,8 +123,14 @@ | ||
123 | 123 … | function push (to, hops) { |
124 | 124 … | return ps.push(meta ? {id: to, hops: hops} : to) |
125 | 125 … | } |
126 | 126 … | |
127 … | + if (live) { | |
128 … | + awaitSync(function () { | |
129 … | + ps.push({sync: true}) | |
130 … | + }) | |
131 … | + } | |
132 … | + | |
127 | 133 … | //by default, also emit your own key. |
128 | 134 … | if(opts.self !== false) |
129 | 135 … | push(start, 0) |
130 | 136 … |
Built with git-ssb-web