depecher icon indicating copy to clipboard operation
depecher copied to clipboard

invites

Open Thaodan opened this issue 7 years ago • 8 comments

Currently invites are just show as unsupported. whats is needed to show them properly?

Thaodan avatar May 14 '18 13:05 Thaodan

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

blacksailer avatar May 14 '18 17:05 blacksailer

Are we talking about the same thing in mean "Person xxx added by xx"

Thaodan avatar May 15 '18 19:05 Thaodan

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

blacksailer avatar May 15 '18 20:05 blacksailer

Is there a representation of the objects inside an json object somewhere?

Thaodan avatar May 15 '18 21:05 Thaodan

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!)

blacksailer avatar May 16 '18 13:05 blacksailer

So in this case the type only contains its type?

Thaodan avatar May 16 '18 19:05 Thaodan

In this case @type" - string, "contains_mention" - bool, "disable_notification" - bool, "message" - object.

blacksailer avatar May 16 '18 22:05 blacksailer

I mean in the case of messageChatJoinParseLink.

Thaodan avatar May 19 '18 15:05 Thaodan