Comments (6)
@Arman92 ?
from go-tdlib.
Hi,
What have tried so far?
from go-tdlib.
Hi, used getChatList example
matched one chat by id, this works
for that char id I do:
ok, err := client.OpenChat(chat.ID)
spew.Dump(ok, err)
msg, err := client.GetMessage(chat.ID, chat.LastReadInboxMessageID)
spew.Dump(msg, err)
ok, err = client.ViewMessages(chat.ID, []int64{chat.LastReadInboxMessageID}, true)
spew.Dump(ok, err)
ok, err = client.Close()
spew.Dump(ok, err)
ViewMessages does not mark message as readed
from go-tdlib.
bump
from go-tdlib.
Sorry I took you too long, I've been busy as hell!
Well you are passing the LastReadInboxMessageID as second parameter to ViewMessages(), so you are asking to read the messages until LastReadInboxMessageID which is trivial.
Just replace it with
chat.LastMessage.ID
That would be it.
from go-tdlib.
Actually there is more to it, you will have to open chat, do ViewMessages, close chat.
And pay attention that most of functions for getting messages return then in reverse chronological order
from go-tdlib.
Related Issues (20)
- Is it possible to save session to string
- TDLib v1.8.0 support? HOT 1
- Struct member User.ID should be int64, not int32
- README building instruction does not work for latest tdlib HOT 2
- gcc and tdlib build on windows ( instruction ) HOT 1
- addProxy timeout
- Can't get past auth stage HOT 1
- Is it possible to use .session + .json?
- Valid api_id must be provided. Can be obtained at https://my.telegram.org
- send photo or video question
- Unable to download files > 17MB HOT 1
- Build in docker HOT 7
- Implicit declaration of function
- error /usr/bin/ld: cannot find -lc++ HOT 10
- Where should I clone and build the Tdlib repo?
- "Library not found" error on macos system HOT 1
- ChatMember problem
- cannot unmarshal object into Go struct field .last_message of type tdlib.MessageSender
- Missing -lstdc++ in sources
- UPDATE_APP_TO_LOGIN error when i try to register new session
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 go-tdlib.