-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement sendChatChecked (mark as read) #43
Comments
Thanks for sharing a useful information. I'll update the |
I confirmed this sendChatChecked are useable. |
It's really necessary to have this method otherwise It can't immediately send messages back to client even the bot is online. |
I need help about this .-. |
The curve client has no "sendChatChecked" method So I tried making one, based on "acceptGroupInvitation" method and classes. At first it gave me TalkException : 'invalid mid', but that was just because I forgot to change the field id for lastMessageId (it overwrote consumer, the mid). Now I'm getting no error but my chats are still not being read. The fields are just like in the OP :
The args class writes fields according to it, and the result class also reads fields according to it. And I passed : I'm calling the method from my main client (not the group/room object nor the sender object). Passing their mids as consumer. I didn't create the methods that starts with 'process', also didnt add it to the dictionary thing. Do I need to do so? Btw I don't see any thrift file or curve package in this repo. What were you refering to? Thanks |
Nvm. Turns out it read but it was still not immediate (had to send another message to refresh). You can use the _client_out to make it immediate. In fact, the _client_out only works for this in my case. Sending messages using _client_out doesn't work. So I send message normally and THEN sendChatChecked using _client_out. The message will be sent/received after the last chat is read. You can find about _client_out somewhere here in other issue. Forgot which. |
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.)In a python code:
Just as the above code shown, it requires 2 parameters:
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 aGROUP
or aROOM
then it becomes amessage.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.)
The text was updated successfully, but these errors were encountered: