Skip to content

Seperated Discord implementation and added MS Teams#1

Closed
wwa-jvteeffelen wants to merge 10 commits intojack-mil:masterfrom
wwa-jvteeffelen:master
Closed

Seperated Discord implementation and added MS Teams#1
wwa-jvteeffelen wants to merge 10 commits intojack-mil:masterfrom
wwa-jvteeffelen:master

Conversation

@wwa-jvteeffelen
Copy link
Copy Markdown
Contributor

Hey, thank you for this cool little application!
I was looking for something similar, but wanted to use a different service, so I put the Discord functionality in a different file and added an option for MS Teams for it.
Figured I could open a PR so others might also find use for it.

@jack-mil
Copy link
Copy Markdown
Owner

Hi there, and thank you for your PR! I didn't think anyone else was actually using this, haha. It might be a little while before I can properly review and merge, and I can't test it personally because I don't use MS Teams. But the commits will be available here in the mean-time for anyone else that is looking for additional services!

@jack-mil
Copy link
Copy Markdown
Owner

ah, have you been noticing that too! sometimes It returns the 104.18.0.0 broadcast address!?
OK I am not crazy cloudflare is just acting strange. Thanks for pointing this out, I'll try to make a chance to investigate this and get it fixed

@wwa-jvteeffelen
Copy link
Copy Markdown
Contributor Author

Yes it was the exact same here for some reason.
Can't do much about that one sadly...

Good thing you already had those other 2 providers set there. Only needed to parse it slightly differently to make that work.

It would maybe be neater to use an enum provider and use different parsing options per provider, but this was just a quick fix to get it working again.

jack-mil pushed a commit that referenced this pull request Mar 26, 2026
Cloudflare stopped working for some reason, and I don't trust them
anymore anyway. Open to other privacy respecting and/or simple recs.

Related to #1
@jack-mil
Copy link
Copy Markdown
Owner

I quickly added a fix for the Cloudflare issue like you did.

When I have more time, I do want to revisit including the teams stuff you worked on, and also add the dependencies to the script and pin versions for use with uv run etc.

jack-mil pushed a commit that referenced this pull request Mar 28, 2026
I am sure the embed card for Teams could use lots of fancy features but I can't test it.

Original implementation from contributor in #1

Co-authored-by: J.J. van Teeffelen <j.vteeffelen@wwa.nl>
@jack-mil
Copy link
Copy Markdown
Owner

jack-mil commented Mar 28, 2026

Can you test out the implementation of the Teams notification on the msteams branch? I don't have a way to run that myself. I just used the payload you originally committed. Looks like the cards can get quite advanced if you want.

Your separate interfaces and classes approach is probably exactly how it should be done if this was a complex real application, but for this I kinda just want to keep a simple single-file python script for convenience. So I just added a new function.

If everything looks good from your side, I'll merge that commit into master then close this PR out. Feel free to add any additional info/styling to the teams payload if you want after that.

add configuration instruction per service in readme
@wwa-jvteeffelen
Copy link
Copy Markdown
Contributor Author

Verified it to work.
Microsoft changed a couple things with how webhooks are configured, so I had to make a slight change.

I've also updated the readme with extra instructions

jack-mil pushed a commit that referenced this pull request Apr 1, 2026
I am sure the embed card for Teams could use lots of fancy features but I can't test it.

Original implementation from contributor in #1

Co-authored-by: J.J. van Teeffelen <j.vteeffelen@wwa.nl>
@jack-mil
Copy link
Copy Markdown
Owner

jack-mil commented Apr 1, 2026

So the webhook payload version number decreased? OK that sounds weird but I added it in bd0dcf5. Thanks for the docs part too. Going to close this PR now, but feel free to open more if something is still not right.

I will be monitoring and mirroring back to this repo Github for the time being, but if you have Codeberg, I am in the process of migrating most of my things over there. Up to you. https://codeberg.org/jack-mil/ip-notify/

https://giveupgithub.org/

@jack-mil jack-mil closed this Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants