Function: eca-chat-media--extension-for-type
eca-chat-media--extension-for-type is a natively compiled function
defined in eca-chat-context.el.
Signature
(eca-chat-media--extension-for-type TYPE)
Documentation
Return file extension (without dot) for mime TYPE.
TYPE can be a string or symbol.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat-context.el
;;;; Media/yank functions
(defun eca-chat-media--extension-for-type (type)
"Return file extension (without dot) for mime TYPE.
TYPE can be a string or symbol."
(let* ((type-str (if (symbolp type) (symbol-name type) type))
(clean (and type-str (string-trim type-str))))
(or (cdr (assoc-string clean eca-chat-media--mime-extension-map t))
(when clean
(let* ((parts (split-string clean "/"))
(raw-subtype (cadr parts))
(subtype (car (split-string (or raw-subtype "") "\\+"))))
(unless (string-empty-p subtype)
subtype)))
"png")))