aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramirouche <amirouche+dev@hypermove.net>2018-01-20 03:06:12 +0100
committeramirouche <amirouche+dev@hypermove.net>2018-01-20 03:06:12 +0100
commit50df5d3da406a1b7da8dc0708fb62d19c47508e2 (patch)
tree4443b2e030c9b5f0448f83d44a3d2abe98bd7320
parentfc1de8edf7fc7cd1edce828be9e77ba70e0dc504 (diff)
downloadgnunet-guile2-50df5d3da406a1b7da8dc0708fb62d19c47508e2.tar.gz
gnunet-guile2-50df5d3da406a1b7da8dc0708fb62d19c47508e2.zip
c3b2: small fixes
- if the download timeouts then the file is #f, filter it - the published file is only the message
-rwxr-xr-xprototypes/c3b2/web.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/prototypes/c3b2/web.scm b/prototypes/c3b2/web.scm
index aab9ce7..20e53f1 100755
--- a/prototypes/c3b2/web.scm
+++ b/prototypes/c3b2/web.scm
@@ -63,7 +63,10 @@ exec guile -L $(pwd) -e '(@ (web) main)' -s "$0" "$@"
63 63
64(define (c3b2/topics) 64(define (c3b2/topics)
65 "Return vertices of topics ie. messages without parent" 65 "Return vertices of topics ie. messages without parent"
66 (map get (fs:find 'parent #f))) 66 (map utf8->string
67 (filter values
68 (map (lambda (uri) (download %configuration uri))
69 (search %configuration '("c3b2://v1/topic"))))))
67 70
68(define (c3b2/topic-add! body) 71(define (c3b2/topic-add! body)
69 (let ((new-topic `((kind . message) 72 (let ((new-topic `((kind . message)
@@ -95,7 +98,7 @@ exec guile -L $(pwd) -e '(@ (web) main)' -s "$0" "$@"
95 ,body)))) 98 ,body))))
96 99
97(define (template/topic topic) 100(define (template/topic topic)
98 `(div (p ,(vertex-ref topic 'body)))) 101 `(div (p ,topic)))
99 102
100(define (template/index topics) 103(define (template/index topics)
101 `(,(map template/topic topics) 104 `(,(map template/topic topics)