Comments (3)
listener := tdlibClient.GetListener()
defer listener.Close()
for update := range listener.Updates {
if update.GetClass() == client.ClassUpdate {
if update.GetType() == client.TypeUpdateNewChat {
updateNewChat := update.(*client.UpdateNewChat)
log.Printf("%#v", updateNewChat)
}
// or
updateNewMessage, ok := update.(*client.UpdateNewMessage)
if ok {
log.Printf("%#v", updateNewMessage)
}
// etc
// https://github.com/zelenin/go-tdlib/blob/ec36320d03ff5c891bb45be1c14317c195eeadb9/client/type.go#L1028-L1108
}
}
from go-tdlib.
@zelenin Dear Alexander, Can you help me with this matter?
from go-tdlib.
thank you very much.
I will check this solution and will make you aware if any problem exists.
from go-tdlib.
Related Issues (20)
- How can I get the correctly message id after I send the message ? HOT 1
- How can I avoid missing messages from update? HOT 5
- After the v0.7.0 version ,I can not start the client
- Example app doesn't work with '400 Parameters aren't specified' HOT 2
- please provide how to get all messageIds from chat HOT 2
- About download messageSender's file HOT 6
- td version daf4801, can not receive phone code HOT 4
- Please support the QrCode login HOT 5
- Getting error 500 on new client HOT 8
- What does the type message that forward from bot ? HOT 2
- How can I get the message of type messageForwardInfo's content ? HOT 1
- authorizationStateHandler State is empty HOT 25
- basic Login need improve HOT 4
- how to set @extra HOT 3
- Is there a memory leak? HOT 1
- search a group use link error ? 400 USERNAME_INVALID,
- How to solve memory problems? Please help me solve it HOT 1
- Any one has the following question? HOT 1
- Could you help with build (make) app errors HOT 1
- build error on Centos but work on ubuntu20.04 HOT 2
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.