LINE icon indicating copy to clipboard operation
LINE copied to clipboard

Got nothing at getRecentMessages()

Open s0rt opened this issue 9 years ago • 15 comments

messages = friend.getRecentMessages(count=10) print messages

The output should be like this:

[LineMessage (contentType=NONE, sender=None, receiver=<LineContact 파랑봇>, msg="hello World!")]

But the output is:

[]

There's nothing inside "[]" things

s0rt avatar May 11 '16 22:05 s0rt

Me too.

pinfort avatar May 14 '16 14:05 pinfort

Same here. Type the following in Python command line...

from line import LineClient client = LineClient("your_email", "your_password") client = LineClient(authToken=client.authToken) client.updateAuthToken()

Do you get exception error: you need to login first because there is no valid certificate?

I am not sure if having the certificate would display the recent messages sent by friends. What do you think?

royl2k90 avatar May 31 '16 01:05 royl2k90

I got the same issue but... exception error: you need to login first because there is no valid certificate? Can be fixed by deleting .line.crt and loging in using the (id, pass)

ghost avatar Jul 05 '16 10:07 ghost

I think I dont have any issue about the certificate. It's just can't read the message. It works when I send a message, but can't read the message.

s0rt avatar Jul 06 '16 01:07 s0rt

I think it's letter sealing, turn it off and you may see the message.

anusoft avatar Jul 06 '16 03:07 anusoft

True you can try disabling letter sealing on your bot account on phone Settings > Chats & Voice Calls > Letter sealing Didnt work for me though, no matter how many times i login , update authtoken or anything I still cant read messages somehow

ghost avatar Jul 06 '16 13:07 ghost

still can't read messages even though letter sealing disabled.

asdqwe3124 avatar Aug 04 '16 18:08 asdqwe3124

I got nothing as well in getRecentMessages. What happened?

albertlieyingadrian avatar Oct 10 '16 20:10 albertlieyingadrian

Turn off Letter Sealing, use Long Poll to get Message. Hope work. cuz this way can get all activity happend on a account

ii64 avatar Mar 27 '17 15:03 ii64

ok I turned off letter sealing. How do I use long Poll to get messages?

anythingg avatar Jun 18 '17 07:06 anythingg

the example.py had example how to use longPoll

ii64 avatar Jun 20 '17 11:06 ii64

i dont see an example.py but i found an echobot.py inside of the examples folder which has longPoll. if I run the script after modifying it with my authToken and certificate then i get an error because of the line receiver.sendMessage("[%s] %s" % (sender.name, msg))

the error i get is this

jin@jins-pc:~/LINE$ python decepticon-_client.py login successful Traceback (most recent call last): File "decepticon-_client.py", line 21, in receiver.sendMessage("[%s] %s" % (sender.name, msg)) File "/home/jin/LINE/line/models.py", line 68, in sendMessage raise e AttributeError: 'LineClient' object has no attribute 'provider'

and when I change receiver.sendMessage("[%s] %s" % (sender.name, msg)) to message.sendMessage("[%s] %s" % (sender.name, msg)) i get this error

jin@jins-pc:~/LINE$ python decepticon-_client.py login successful Traceback (most recent call last): File "decepticon-_client.py", line 21, in message.sendMessage("[%s] %s" % (sender.name, msg)) AttributeError: LineMessage instance has no attribute 'sendMessage'

if i change it to sender.sendMessage(msg) i don't get any errors and the script works like normal why wont receiver and message work? how do i get them to work?

anythingg avatar Jun 20 '17 14:06 anythingg

its looks like something missing cuz AttributeError: 'LineClient' object has no attribute 'provider' or you was edit something

ii64 avatar Jun 21 '17 06:06 ii64

I didn't edit anything. I even tried with the default carpedm20 client.py but still get that error.

client.py https://pastebin.com/80MGcmZK

anythingg avatar Jun 22 '17 04:06 anythingg

Can someone please help me?

anythingg avatar Jul 04 '17 22:07 anythingg