Skip to content
Snippets Groups Projects
Commit 85a0b47f authored by Allen Gilliland's avatar Allen Gilliland
Browse files

don't use `?` in attribute names for properties returned to the frontend.

parent 8c19fa69
Branches
Tags
No related merge requests found
......@@ -77,7 +77,7 @@ export default class PulseListChannel extends Component {
render() {
let { channel, channelSpec, user } = this.props;
let subscribable = channelSpec && channelSpec["recipients?"];
let subscribable = channelSpec && channelSpec.allows_recipients;
let subscribed = false;
if (subscribable) {
subscribed = _.any(channel.recipients, r => r.id === user.id);
......
......@@ -63,8 +63,8 @@
"Provides relevant configuration information and user choices for creating/updating `Pulses`."
[]
(let [chan-types (-> channel-types
(assoc-in [:slack :configured?] (slack/slack-configured?))
(assoc-in [:email :configured?] (email/email-configured?)))]
(assoc-in [:slack :configured] (slack/slack-configured?))
(assoc-in [:email :configured] (email/email-configured?)))]
{:channels (if-not (get-in chan-types [:slack :configured])
;; no Slack integration, so we are g2g
chan-types
......
......@@ -73,20 +73,20 @@
{:email {:name \"Email\", :recipients? true}
:slack {:name \"Slack\", :recipients? false}}"
{:email {:type "email"
:name "Email"
:recipients? true
:recipients ["user", "email"]
:schedules [schedule-type-daily schedule-type-weekly]}
:slack {:type "slack"
:name "Slack"
:recipients? false
:schedules [schedule-type-hourly schedule-type-daily schedule-type-weekly]
:fields [{:name "channel"
:type "select"
:displayName "Post to"
:options ["#general"]
:required true}]}})
{:email {:type "email"
:name "Email"
:allows_recipients true
:recipients ["user", "email"]
:schedules [schedule-type-daily schedule-type-weekly]}
:slack {:type "slack"
:name "Slack"
:allows_recipients false
:schedules [schedule-type-hourly schedule-type-daily schedule-type-weekly]
:fields [{:name "channel"
:type "select"
:displayName "Post to"
:options ["#general"]
:required true}]}})
(defn channel-type?
"Predicate function which returns `true` if the given argument is a valid value as a channel-type, `false` otherwise."
......@@ -96,7 +96,7 @@
(defn supports-recipients?
"Predicate function which returns `true` if the given channel type supports a list of recipients, `false` otherwise."
[channel]
(boolean (:recipients? (get channel-types channel))))
(boolean (:allows_recipients (get channel-types channel))))
;; ## Entity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment