Closed Anoncheg1 closed 6 months ago
OS: Gentoo Emacs: GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, X toolkit) Features: svg webp ffmpeg Telega: telega v0.8.254 (TDLib v1.8.27-d7203eb) (telega-server v0.8.2)
file:/home/u/sources/telega.el/telega-sticker.el::543
Debugger entered--Lisp error: (wrong-type-argument stringp nil) intern(nil) (let* ((temp (intern (plist-get (plist-get sticker-set :sticker_format) :@type)))) (cond ((eql temp 'stickerFormatTgs) "Animated Stickers") ((eql temp 'stickerFormatWebm) "Video Stickers") ((eql temp 'stickerFormatWebp) "Stickers") ((error "cl-ecase failed: %s, %s" temp '(stickerFormatTgs stickerFormatWebm stickerFormatWebp)) nil))) (cond ((eql temp 'stickerTypeMask) "Masks") ((eql temp 'stickerTypeCustomEmoji) "Custom Emojis") ((eql temp 'stickerTypeRegular) (let* ((temp (intern (plist-get (plist-get sticker-set :sticker_format) :@type)))) (cond ((eql temp 'stickerFormatTgs) "Animated Stickers") ((eql temp 'stickerFormatWebm) "Video Stickers") ((eql temp 'stickerFormatWebp) "Stickers") ((error "cl-ecase failed: %s, %s" temp '(stickerFormatTgs stickerFormatWebm stickerFormatWebp)) nil)))) ((error "cl-ecase failed: %s, %s" temp '(stickerTypeMask stickerTypeCustomEmoji stickerTypeRegular)) nil)) (let* ((temp (intern (plist-get (plist-get sticker-set :sticker_type) :@type)))) (cond ((eql temp 'stickerTypeMask) "Masks") ((eql temp 'stickerTypeCustomEmoji) "Custom Emojis") ((eql temp 'stickerTypeRegular) (let* ((temp (intern (plist-get ... :@type)))) (cond ((eql temp 'stickerFormatTgs) "Animated Stickers") ((eql temp 'stickerFormatWebm) "Video Stickers") ((eql temp 'stickerFormatWebp) "Stickers") ((error "cl-ecase failed: %s, %s" temp '...) nil)))) ((error "cl-ecase failed: %s, %s" temp '(stickerTypeMask stickerTypeCustomEmoji stickerTypeRegular)) nil))) (string-trim-right (let* ((temp (intern (plist-get (plist-get sticker-set :sticker_type) :@type)))) (cond ((eql temp 'stickerTypeMask) "Masks") ((eql temp 'stickerTypeCustomEmoji) "Custom Emojis") ((eql temp 'stickerTypeRegular) (let* ((temp (intern ...))) (cond ((eql temp ...) "Animated Stickers") ((eql temp ...) "Video Stickers") ((eql temp ...) "Stickers") ((error "cl-ecase failed: %s, %s" temp ...) nil)))) ((error "cl-ecase failed: %s, %s" temp '(stickerTypeMask stickerTypeCustomEmoji stickerTypeRegular)) nil))) ": ?") (let ((title935 (string-trim-right (let* ((temp (intern ...))) (cond ((eql temp ...) "Masks") ((eql temp ...) "Custom Emojis") ((eql temp ...) (let* ... ...)) ((error "cl-ecase failed: %s, %s" temp ...) nil))) ": ?"))) (let* ((start941 (point)) (lwprefix936 (make-string (max 0 (- 12 (string-width title935))) 32)) (prefix937 (if (consp lwprefix936) (progn (car lwprefix936)))) (wrap938 (if (consp lwprefix936) (cdr lwprefix936) lwprefix936)) (telega--column-offset (+ telega--column-offset (string-width (or prefix937 wrap938 "")))) region942) (prog1 (progn (let ((start943 (point)) (face944 'telega-describe-item-title) (result945 (progn ... ...))) (if face944 (progn (add-face-text-property start943 ... face944 ...))) result945) (telega-ins (format "%d\n" (length stickers))) (telega-ins--sticker-list stickers)) (if prefix937 (progn (let ((eol940 ...)) (if (> eol940 ...) (progn ...)) (add-text-properties start941 eol940 (list ... ... ... ...)) (setq start941 eol940)))) (if (and wrap938 (not (string-empty-p wrap938))) (progn (let ((lwprefix-props939 ...)) (while (setq region942 ...) (add-text-properties start941 ... lwprefix-props939) (add-text-properties ... ... ...) (setq start941 ...)) (add-text-properties start941 (point) lwprefix-props939)))))) (telega-ins "\n")) (let ((stickers (plist-get sticker-set :stickers))) (let ((title935 (string-trim-right (let* ((temp ...)) (cond (... "Masks") (... "Custom Emojis") (... ...) (... nil))) ": ?"))) (let* ((start941 (point)) (lwprefix936 (make-string (max 0 (- 12 ...)) 32)) (prefix937 (if (consp lwprefix936) (progn (car lwprefix936)))) (wrap938 (if (consp lwprefix936) (cdr lwprefix936) lwprefix936)) (telega--column-offset (+ telega--column-offset (string-width (or prefix937 wrap938 "")))) region942) (prog1 (progn (let ((start943 ...) (face944 ...) (result945 ...)) (if face944 (progn ...)) result945) (telega-ins (format "%d\n" (length stickers))) (telega-ins--sticker-list stickers)) (if prefix937 (progn (let (...) (if ... ...) (add-text-properties start941 eol940 ...) (setq start941 eol940)))) (if (and wrap938 (not (string-empty-p wrap938))) (progn (let (...) (while ... ... ... ...) (add-text-properties start941 ... lwprefix-props939)))))) (telega-ins "\n"))) (closure (t) (sticker-set) (let ((stickers (plist-get sticker-set :stickers))) (let ((title935 (string-trim-right (let* ... ...) ": ?"))) (let* ((start941 (point)) (lwprefix936 (make-string ... 32)) (prefix937 (if ... ...)) (wrap938 (if ... ... lwprefix936)) (telega--column-offset (+ telega--column-offset ...)) region942) (prog1 (progn (let ... ... result945) (telega-ins ...) (telega-ins--sticker-list stickers)) (if prefix937 (progn ...)) (if (and wrap938 ...) (progn ...)))) (telega-ins "\n"))))((:@type "stickerSet" :id "18981377582626..." :title "струс дупи @st..." :name "Sotryasenieoch..." :thumbnail ... :thumbnail_outline ... :is_owned nil ...)) funcall((closure ... ... ...) (:@type "stickerSet" :id "18981377582626..." :title "струс дупи @st..." :name "Sotryasenieoch..." :thumbnail ... :thumbnail_outline ... :is_owned nil ...)) (if sset (funcall sticker-list-ins sset) (setq telega--help-win-param sset-id) (telega-stickerset-get sset-id nil (telega--gen-ins-continuation-callback 'loading sticker-list-ins sset-id))) (let ((sticker-list-ins #'(lambda (sticker-set) (let ((stickers ...)) (let (...) (let* ... ...) (telega-ins "\n"))))) (sset-id (plist-get sset :id))) (if (eq (intern (plist-get sset :@type)) 'stickerSetInfo) (progn (setq sset (telega-stickerset-get sset-id 'locally)))) (if sset (funcall sticker-list-ins sset) (setq telega--help-win-param sset-id) (telega-stickerset-get sset-id nil (telega--gen-ins-continuation-callback 'loading sticker-list-ins sset-id)))) (closure (... ...) nil (set-buffer standard-output) (set ... t) (set ... nil) (set ... ...) (cursor-intangible-mode 1) (cursor-sensor-mode 1) (visual-line-mode 1) (setq telega--chat for-chat) (setq telega-help-win--stickerset sset) (let ... ... ...) (let ... ... ...) ...)() help--window-setup("*Telegram Stic..." (closure ... nil ... ... ... ... ... ... ... ... ... ... ... ...))
I clicked at sticker
In this code - Better don't do anything if (plist-get sticker-set :sticker_format) is null, but I am not shure.
(cl-ecase (telega--tl-type (plist-get sticker-set :sticker_format))
Thanks for reporting! This is due to change in Stickers Telegram API, will be fixed on next commit.
Telega Setup
OS: Gentoo Emacs: GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, X toolkit) Features: svg webp ffmpeg Telega: telega v0.8.254 (TDLib v1.8.27-d7203eb) (telega-server v0.8.2)
Current Behavior
file:/home/u/sources/telega.el/telega-sticker.el::543
Steps to Reproduce
I clicked at sticker
Possible Solution
In this code - Better don't do anything if (plist-get sticker-set :sticker_format) is null, but I am not shure.