Browse Source

fixed publishing putput and blobs.want

master
Vincent Truchseß 9 months ago
parent
commit
0c330a81d9
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/saljut/util/sbot.clj

+ 2
- 0
src/saljut/util/sbot.clj View File

@@ -14,6 +14,7 @@

(defn get-blob [blob-id]
"Retrieves a blob from SSB. Returns the blob's content as byte-array"
(sh/sh "ssb-server" "blobs.want" blob-id)
(let [return (sh/sh "ssb-server" "blobs.get" blob-id :out-enc :bytes)]
(if (zero? (:exit return))
(:out return)
@@ -72,6 +73,7 @@

(defn upload-file [file]
"Uploads file as SSB-blob. Returns the blob-id as string"
(println (str "Uploading " file))
(add-blob (sio/slurp-bytes file)))

(defn get-messages-by-type [msg-type]


Loading…
Cancel
Save