diff options
| author | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2010-04-19 14:45:23 -0400 |
|---|---|---|
| committer | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2010-04-19 14:45:23 -0400 |
| commit | ad7dbd7c4ea18502c66bf5a412758f9a52efaedb (patch) | |
| tree | 047487cbbf366f2c306f03cacaa0e8b51edca2db /src/site.clj | |
| parent | 96b5da4e18cfde412103f8ceb129713ef49b632e (diff) | |
| parent | 73130a732df811e55a96ba38c11c0cb0f6090a8e (diff) | |
Merge branch 'master' of /pichat/repo
Diffstat (limited to 'src/site.clj')
| -rw-r--r-- | src/site.clj | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/site.clj b/src/site.clj index 3686bb9..d45aa09 100644 --- a/src/site.clj +++ b/src/site.clj @@ -886,15 +886,16 @@ (let [room-key (params :room) nick (session :nick) user-id (session :user_id) + image (params :image) mute ((poll *active-mutes*) user-id) - image (params :image)] + has-access (validate-room-access room-key session)] ; --TODO-- ; Because ajaxupload.js doesn't feature an error-handler, ; all responses not equal to "OK" signal errors. - (cond (not nick) (resp-success "NOT_LOGGED_IN") - (not image) (resp-success "INVALID_REQUEST") - mute (resp-success (format-mute mute)) - (not (validate-room-access room-key session)) [200 "UNKNOWN_ROOM"] + (cond (not nick) (resp-success "NOT_LOGGED_IN") + (not image) (resp-success "INVALID_REQUEST") + mute (resp-success (format-mute mute)) + (not has-access) (resp-success "UNKNOWN_ROOM") :else (do-upload session image (lookup-room room-key))))) ;; N.B. -- Upload responses aren't JSON-evaluated |
