zevlg / telega.el

GNU Emacs telegram client (unofficial)
https://zevlg.github.io/telega.el/
GNU General Public License v3.0
1.09k stars 85 forks source link

[solution] PP-ERRORs everywhere on tdlib 1.7.10 #330

Closed ksixty closed 2 years ago

ksixty commented 2 years ago

Telega Setup

OS: Mac OS X 10.15.7 Emacs: GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin19.6.0, NS appkit-1894.60 Version 10.15.7 (Build 19H15)) Telega: telega v0.7.90 (TDLib v1.7.10) (telega-server v0.7.13)

Current Behavior

As sender field has been renamed in a recent commit to tdlib, telega's message parser fails now.

Steps to Reproduce

  1. Build the latest tdlib version (a53cb30e99f937cfd64e0266fa558785a184a553 as of now).
  2. Re-build telega-server.
  3. Run telega and see PP-ERRORs everywhere.

Possible Solution

Update parser to match new field name:

--- a/telega-msg.el
+++ b/telega-msg.el
@@ -1042,7 +1042,7 @@ TL-OBJ could be a \"message\", \"sponsoredMessage\", \"chatMember\" or
                   (sponsoredMessage
                    (list :@type "messageSenderChat"
                          :chat_id (plist-get tl-obj :sponsor_chat_id)))
-                  (message (plist-get tl-obj :sender))
+                  (message (plist-get tl-obj :sender_id))
                   (chatMember (plist-get tl-obj :member_id))
                   ((messageSenderUser messageSenderChat) tl-obj))))
zevlg commented 2 years ago

TDLib 1.7.10 is not yet supported

zevlg commented 2 years ago

Added initial support for TDLib 1.7.10 in the https://github.com/zevlg/telega.el/commit/2474aaf0c9cba06670d3db46b5fe47ce3c6fb97a