carpedm20 / carpedm20/LINE

Implement sendChatChecked (mark as read)

Open
#43 6 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
827
Forks
189
PR merge metrics
No merged PRs in 30d

Description

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.)_

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

In a **python** code:

``` python
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! :+1:
BTW, can I write any issues in Korean next time? :p (just, All issues written in English.)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.