|
178 | 178 | {:message/keys [user inst user text thread-ts ts] :as message}]
|
179 | 179 |
|
180 | 180 | (let [{:user/keys [name slack-id]
|
181 |
| - :user-profile/keys [display-name real-name image-48]} user] |
182 |
| - (def slack-instance (:clojurians-log.application/slack-instance request)) |
| 181 | + :user-profile/keys [display-name real-name image-48]} user] |
| 182 | + (def slack-instance (:clojurians-log.application/slack-instance request)) |
| 183 | + |
183 | 184 |
|
184 | 185 | ;; things in the profile
|
185 | 186 | ;; :image_512 :email :real_name_normalized :image_48 :image_192 :real_name :image_72 :image_24
|
186 | 187 | ;; :avatar_hash :title :team :image_32 :display_name :display_name_normalized
|
187 | 188 | (list [:div.message
|
188 | 189 | {:id (cl.tu/format-inst-id inst) :class (when (thread-child? message) "thread-msg")}
|
189 |
| - [:a.message_profile-pic {:href (str slack-instance "/users/x/x/" slack-id) :style (str "background-image: url(" image-48 ");")}] |
| 190 | + [:a.message_profile-pic {:href (str slack-instance "/users/x/x/" slack-id) :style (str "background-image: url(" image-48 ");")}] |
190 | 191 | ;;[:a.message_username {:href (str slack-instance "/team/" slack-id)}
|
191 |
| - [:a.message_username {:href (str "/_/_/users/" slack-id)} |
| 192 | + [:a.message_username {:href (str "/_/_/users/" slack-id)} |
192 | 193 | (some #(when-not (str/blank? %) %) [display-name real-name name])]
|
193 | 194 | [:span.message_timestamp [:a {:rel "nofollow"
|
194 | 195 | :href (path-for context
|
|
288 | 289 | [:div {:style " box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); max-width: 350px;
|
289 | 290 | margin: auto; text-align: center; font-family: sans-serif;"}
|
290 | 291 |
|
291 |
| - (for [[k v] (select-keys (get-in context [:data/username 0]) |
| 292 | + (for [[k v] (select-keys (get-in context [:data/user-profile 0]) |
292 | 293 | [:user-profile/display-name :user-profile/real-name :user-profile/image-192 :user/slack-id])
|
293 | 294 | :when (-> k)]
|
294 | 295 | (case k
|
295 |
| - :user-profile/image-192 [:img {:src [v], :alt "John", :style "width:95%; border-radius:80%; padding: 8px 0px;"}] |
296 |
| - :user-profile/display-name [:h1 [k v]] |
297 |
| - :user-profile/real-name [:p {:style "color: grey; font-size: 18px;"} [k v]] |
| 296 | + :user-profile/image-192 [:img {:src v, :style "width:95%; border-radius:80%; padding: 8px 0px;"}] |
| 297 | + :user-profile/display-name [:h1 v] |
| 298 | + :user-profile/real-name [:p {:style "color: grey; font-size: 18px;"} v] |
298 | 299 | :user/slack-id [:a {:style "border: none; outline: 0; display: inline-block; padding: 8px 0px;
|
299 | 300 | color: white; background-color: #000; text-align: center; cursor: pointer;
|
300 | 301 | width: 100%; font-size: 18px;"
|
|
0 commit comments