This repository was archived by the owner on May 12, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-10
lines changed
Expand file tree Collapse file tree 1 file changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -54,19 +54,27 @@ exports.init = function (ssb, config) {
5454 raw : view ,
5555
5656 isFollowing : function ( { source, dest } , cb ) {
57- view . get ( ( err , graph ) => {
58- if ( err ) return cb ( err )
59- var following = graph && graph [ source ] && graph [ source ] [ dest ] === true
60- cb ( null , following )
61- } )
57+ if ( values && values [ source ] ) {
58+ cb ( null , values [ source ] [ dest ] === true )
59+ } else {
60+ view . get ( ( err , graph ) => {
61+ if ( err ) return cb ( err )
62+ var following = graph && graph [ source ] && graph [ source ] [ dest ] === true
63+ cb ( null , following )
64+ } )
65+ }
6266 } ,
6367
6468 isBlocking : function ( { source, dest } , cb ) {
65- view . get ( ( err , graph ) => {
66- if ( err ) return cb ( err )
67- var blocking = graph && graph [ source ] && graph [ source ] [ dest ] === false
68- cb ( null , blocking )
69- } )
69+ if ( values && values [ source ] ) {
70+ cb ( null , values [ source ] [ dest ] === false )
71+ } else {
72+ view . get ( ( err , graph ) => {
73+ if ( err ) return cb ( err )
74+ var blocking = graph && graph [ source ] && graph [ source ] [ dest ] === false
75+ cb ( null , blocking )
76+ } )
77+ }
7078 } ,
7179
7280 /// return a list of everyone you have blocked privately
You can’t perform that action at this time.
0 commit comments