Skip to content

Implement sendChatChecked (mark as read) #43

@ssut

Description

@ssut

I found a way to implement sendChatChecked method with LINE thrift while making a bot. (It's not python, https://github.com/ssut/llama)
Since you may know, there is a method which marks a message as read.

Here are the details as follows:

In thrift file:
(I think you've removed this shortcode from the origin or not. for what it's worth, you have to update the curve package for implementing.)

...
    void sendChatChecked(
        1: i32 seq,
        2: string consumer,
        3: string lastMessageId) throws(1: TalkException e);
...

In a python code:

def _sendChatChecked(self, target, msgid, seq=0):
    return self._client.sendChatChecked(seq, target, msgid)

Just as the above code shown, it requires 2 parameters:

  • The target to send it's read confirmation.
  • The msgid as we can suggest by its name, message.id.

The target becomes a reference to the interlocutor, which can be a "room", a "group" or a "user", for instance, If the chat room's ToType is a GROUP or a ROOM then it becomes a message.to.

Good luck to implement that support for developers who use this library! 👍
BTW, can I write any issues in Korean next time? :p (just, All issues written in English.)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions