Comments (8)
I have been using all three methods (open, close and viewMessages WITH force read option True) but it won't always work. Is there a way to effectively mark messages as read for sure?
from td.
@JaEdmuva @CharlesOkwuagwu
Update: I got the reason why the openChat - viewMessages - closeChat
is not reliable.
To mark message as read in a reliable way, you must only openChat
. You MUST NOT closeChat
.
In my program, I have another timer thread. It calls openChat
and viewMessages
once a second. After 10 seconds, it calls closeChat
.
You must keep the chat "opened" as long as possible, to make it reliable.
from td.
To achieve this you need to call OpenChat/CloseChat when chats are opening/closed by the user and call ViewMessages whenever a message is shown to the user. The library will figure out which messages should be read itself. Messages are read only if they are shown in currently opened chat, but if you definitely need to read messages in a closed chat, you may use force_read parameter of ViewMessages method.
from td.
tanx
from td.
This method does not work, the "viewMessages" method works
from td.
I have been using all three methods (open, close and viewMessages WITH force read option True) but it won't always work. Is there a way to effectively mark messages as read for sure?
@JaEdmuva Hi, have you found a reliable way to mark as read?
from td.
@JaEdmuva @CharlesOkwuagwu Update: I got the reason why the
openChat - viewMessages - closeChat
is not reliable.To mark message as read in a reliable way, you must only
openChat
. You MUST NOTcloseChat
.In my program, I have another timer thread. It calls
openChat
andviewMessages
once a second. After 10 seconds, it callscloseChat
. You must keep the chat "opened" as long as possible, to make it reliable.
Are you sending openChat
and viewMessages
for each chat received?
from td.
Are you sending
openChat
andviewMessages
for each chat received?
I am creating an anti-spam bot, so I do it for every chat unless it's whitelisted. You need to do that basing on your need.
If you want to mark a message as read, you need to open
that chat (and keep it opened for a while)
This is my code, for your reference.
from td.
Related Issues (20)
- GetChat/LoadChat not work HOT 4
- . HOT 1
- public Builder excludeRoute(@NonNull IpPrefix prefix)
- Telegram giriş yapılmıyor HOT 6
- Open source
- Account Banned HOT 1
- E.g github app
- halo, tolong bantu saya, akun saya telah di bajak orang lain, dan langsung di ubah ke nomor luar negeri, semua foto dan password akun saya di sana semuaa, tolong bantu sayaaa HOT 15
- Is it necessary to build tdutils to include it? HOT 3
- "Proxy Authentication Required" error when connecting to HTTP proxy via TDLIB HOT 4
- Easier way to determine if current user is a chat admin than via searchChatMembers ? HOT 1
- I can't send a video to a secret chat. HOT 4
- java, how to convert object to json and have a special field "_" which is the class name HOT 1
- سلام
- سلام
- APPID CHANNELS_TOO_MUCH error
- How to send a story as the current user? HOT 14
- Lots of code: 400, Too Many Requests: retry after 15 HOT 5
- "Last server dialog date didn't increased from" HOT 2
- "Limit reached" error when trying to join a channel or group, even though joined only ~20. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from td.