Open Thaodan opened 6 years ago
add new static parse function of messageChatJoinParseLink to ParseObject
add to function parseMessageContent newly created function in ParseObject class
Edit data in MessagingModel class to visualize this message type
edit MesaageItem.qml by adding Component to show this message about new user
Are we talking about the same thing in mean "Person xxx added by xx"
I thought about " xxx joined by invite link"
And yes, it is one type of message in tdlib. I may be mistaken only with type. It can have some other name
Is there a representation of the objects inside an json object somewhere?
Yes, it is on https://core.telegram.org/tdlib/docs/
Here is an example. Let's try to parse updateNewMessage json received from telegram. In json format it looks like this.
Every json object response from telegram has additional field @type
- which keeps a type of received object.
According to docs, updateNewMessage has fields contains_mention, disable_notification which are boolean and message field wich is object_ptr. In json format object_ptr is json object.
In depecher parsing this message field is look like this.
Also updateNewMessage is used by MessagingModel. It receives signal from TdlibJsonWrapper and add it to message list here
To see how types converted to json, please read a description to td_json_client here
Happy hacking!)
So in this case the type only contains its type?
In this case @type" - string, "contains_mention" - bool, "disable_notification" - bool, "message" - object.
I mean in the case of messageChatJoinParseLink.
Currently invites are just show as unsupported. whats is needed to show them properly?