Comments (5)
To fix the root cause, Microsoft would need respond with a code indicating the failure. Because of this, i'm going to go ahead and close the issue.
If you can uncover the exact max message length and care to submit a pull request limiting this in code, I'd be happy to review.
from pymsteams.
I did use a script to verify the size constraints, and I'll detail it below if it's interesting, but I talked with the Teams team and believe I found a better way.
It seems the reason for the 200 status in cases where the message doesn't send is due to 3rd party connectors, incorrectly, handling errors by deleting the configuration.
tl;dr
The team let me know that the content of the response will be '1'
when the message is sent successfully. So I propose updating the check before returning in send
from if r.status_code == requests.codes.ok:
to if r.status_code == requests.codes.ok and r.text == '1':
end tl;dr
teams_uri = <<webhook>>
import pymsteams
# x = 20811 # stops sending at 20,812
x = 20827 # stops sending w\o title at 20,828
crd = pymsteams.cardsection()
crd.text('x' * x)
msg = pymsteams.connectorcard(teams_uri)
# msg.title(x)
msg.summary('0') # adding characters stops it
msg.addSection(crd)
msg.send()
It's seemingly the combined data size sent that effects it
Without a summary, I get an exception so I'm using a single char for that (more characters would then mean removing others from the cardsection text or title, but it's not 1-for-1 i.e. a summary of '00' won't work if a "bare text message" is sent w\ 20826 characters
With a title that was the count of characters sent, the limit is 20,811 chars
W\o a title the limit bumps up to 20,827
from pymsteams.
Fair enough. I've re-opened it, and can look at this when I get a chance. Honestly, it might be a bit, so pull requests are welcome.
from pymsteams.
I've created the change locally and added a test. Do I need certain permissions to create a PR\branch? I'm getting a 403 error. Sorry, first time I'm contributing to someone else's GitHub project
from pymsteams.
This is now merged and released under v0.1.14. Thanks!
from pymsteams.
Related Issues (20)
- HttpPost Basic Auth. HOT 6
- Non-http link buttons don't show HOT 2
- [Question] Delete message generator by Incoming Webhook HOT 1
- pymsteams async_connectorcard Python 2 incompatibility HOT 4
- Add tags to connectorcard HOT 7
- Help needed HOT 1
- 0.2.1 issue with last_http_status HOT 2
- Adding Text to Card does not work if PotentialAction or CardSection is added prior
- How to add mension in text HOT 2
- Pinning requirements HOT 3
- TeamsWebhookException despite successful POST HOT 6
- Adaptive card is not rendered on android phone HOT 1
- HTML tables stopped working HOT 4
- "==" not sent properly HOT 1
- proxy params is changed for httpx HOT 1
- Handling MS Teams Rate Limit Request Failures HOT 1
- !important (Notification)
- Ongoing Support and Request for Maintainers HOT 6
- .color() not working HOT 2
- SetuptoolsDeprecationWarning: use of dashes
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 pymsteams.