anchor.diff:  ;;;  Channel management
   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   
  -(defun groups-from-domain (domain)
  +(defun groups-from-domain (domain include-channels-p)
     (loop
       for group in (potato.core:find-groups-in-domain domain)
       when (potato.core:user-role-for-group group (potato.core:current-user))
  -      collect (st-json:jso "id" (potato.core:group/id group)
  -                           "name" (potato.core:group/name group)
  -                           "channels" (api-load-channels-for-group group))))
  +      collect (apply #'st-json:jso
  +                     "id" (potato.core:group/id group)
  +                     "name" (potato.core:group/name group)
  +                     "type" (symbol-name (potato.core:group/type group))
  +                     (if include-channels-p
  +                         (list "channels" (api-load-channels-for-group group))))))
   
   (defun group-and-channels-from-domain (domain)
     (st-json:jso "id" (potato.core:domain/id domain)
                  "name" (potato.core:domain/name domain)
  -               "groups" (groups-from-domain domain)))
  +               "groups" (groups-from-domain domain t)))
   
   (define-api-method (api-channels-screen "/channels" nil ())
     (api-case-method
  
positive.code:            "name" (potato.core:domain/name domain)
             "type" (symbol-name (potato.core:domain/domain-type domain))
             (if (or include-groups-p include-channels-p)
                 (list "groups" (mapcar (lambda (group)
                                          (apply #'st-json:jso
                                                 "id" (potato.core:group/id group)
                                                 "name" (potato.core:group/name group)
                                                 "type" (symbol-name (potato.core:group/type group))
                                                 (if (and include-channels-p
                                                          (potato.core:user-role-for-group group (potato.core:current-user)))
                                                     (list "channels" (api-load-channels-for-group group)))))
                                        (potato.core:find-groups-in-domain id)))))))
  
  (defun parse-and-check-input-as-json ()
    (let ((json-text (hunchentoot:raw-post-data :force-text t)))
  
negative.code:        for domain-user in (potato.core:load-domains-for-user (potato.core:current-user))
         for domain = (potato.db:load-instance 'potato.core:domain (potato.core:domain-user/domain domain-user))
         collect (group-and-channels-from-domain domain)))))
  
  (define-api-method (api-channels2-screen "/channels2" nil ())
    (api-case-method
  