Open Xeddon opened 6 years ago
Do you have problem with ISessionStore
? Try to call client.Start();
without adding .UpdateMessage
to make sure the instance is not null and able to send message
Yes i have problem with that. Sorry my example not shows that i use new FileSessionStore() when i create TelegramClient. I also tryed to client.Start(); first and than UpdateMessage. I just want receive messages and it worked fine on first start (and also some restarts more). I'm not sure about this: Sometimes i can restart the application and it will work about 5 minutes (NOT SURE), sometimes after one restart it not work anymore. When i restart the application ProcessMessage is called with that Codes: bad_msg_notification new_session_created rpc_result
I also tryed to save my informations from session store manually and it worked, but there is the problem that i get some messages again.
I suggest you to store your session file (ISessionStore) somewhere in your folder. Use that file everytime the application starts. You don't need to recreate the session file and off course, don't need to "resign in" each time you start the application because your authentication will be stored there.
Yes the session.dat is stored and will be automatically loaded on restart. I also not recreate session file and not resign in. I edited my example about the file session store. Do you have a working example like my to receive messages?
i have the same issue
I don't have any problems in receiving new update. I think this library is the most stable among others. Just do what I suggested above
copied code and I have the same problem.
in debug:
"MessageSeqNoTooLow. Resoliving by resetting session and resending message"
This is my Code. On first run everything worked correctly. But when the program is closed and reopened again than UpdateHandler not get called anymore. client.IsUserAuthorized() gives true. When i delete Session.dat i can reenter my code and it will work. After 5 runs of the programm i have to wait 24 hours because of flood error.