       (added (set-difference current-buffers floobits-open-buffers))
       (deleted (set-difference floobits-open-buffers current-buffers)))
     (when (or added deleted)
+      (when (and added (not (member "patch" floobits-perms)))
+        (mapcar
+          (lambda (buf-path)
+            (with-current-buffer (find-buffer-visiting buf-path)
+              (setq buffer-read-only t)))
+          added))
       (setq floobits-open-buffers current-buffers)
       (let* (
           (added-text


(defun floobits-event-room_info (req)
  (message "Successfully joined room %s" floobits-room)
  (message "project path is %s" (floo-get-item req 'project_path))
  (floobits-add-hooks)
  (dired (floo-get-item req "project_path")))

(defun floobits-event-join (req)
  (message "%s" req)

        (floobits-create-connection))
      (message "Invalid url! I should look like: https://floobits.com/r/owner/room/"))))

(defun _floobits-is-buffer-public (buf)
  (let ((name (buffer-name buf)))
    (cond
      ((string="*" (substring name 0 1)) nil)
      ((string=" " (substring name 0 1)) nil)
      ((_floobits-is-buffer-shared buf) t)
      (t nil))))

(defun _floobits-is-buffer-shared (buf)
  (let ((path (buffer-file-name buf))
  (length (length floobits-share-dir)))
    (cond
     ((eq 0 length) nil)
     ((< (length path) length) nil)
     ((string= floobits-share-dir (substring path 0 length)) t)
     (t nil))))

(defun floobits-get-public-buffers ()
