[#11113] Can't send image without description in 1-1 and group chats
This commit is contained in:
parent
2901f4c7cf
commit
0cb554f5c6
|
@ -103,6 +103,8 @@
|
||||||
([text users-fn]
|
([text users-fn]
|
||||||
(replace-mentions text users-fn 0))
|
(replace-mentions text users-fn 0))
|
||||||
([text users-fn idx]
|
([text users-fn idx]
|
||||||
|
(if (string/blank? text)
|
||||||
|
text
|
||||||
(let [mention-key-idx (string/index-of text "@" idx)]
|
(let [mention-key-idx (string/index-of text "@" idx)]
|
||||||
(if-not mention-key-idx
|
(if-not mention-key-idx
|
||||||
text
|
text
|
||||||
|
@ -117,7 +119,7 @@
|
||||||
(subs text (+ (inc mention-key-idx)
|
(subs text (+ (inc mention-key-idx)
|
||||||
(count alias)))])
|
(count alias)))])
|
||||||
mention-end (+ (inc mention-key-idx) (count public-key))]
|
mention-end (+ (inc mention-key-idx) (count public-key))]
|
||||||
(recur new-text (fn [] users) mention-end))))))))
|
(recur new-text (fn [] users) mention-end)))))))))
|
||||||
|
|
||||||
(defn check-mentions [cofx text]
|
(defn check-mentions [cofx text]
|
||||||
(replace-mentions text #(get-mentionable-users cofx)))
|
(replace-mentions text #(get-mentionable-users cofx)))
|
||||||
|
|
Loading…
Reference in New Issue