arcuru / pokem Goto Github PK
View Code? Open in Web Editor NEWA notification helper for Matrix.
License: MIT License
A notification helper for Matrix.
License: MIT License
In addition to the args, the CLI command should accept stdin inputs as the message.
The daemon is already running, and is accessible to http requests.
It should serve a basic Web UI if accessed with no room info, allowing easily pinging from a web browser.
Just a basic form with "Room" and "Message"
As suggested in #5, this tracks implementing the sending of actual files in the notifications. You can currently send only text messages, but sending actual files as attachments would be pretty useful for this kind of thing.
Implementation-wise, it will need to create FileMessageEventContent and send that. I didn't figure out a way to do that on an initial pass, but I'm probably missing something easy.
I’m running v1.0.0, and suddenly started getting these errors when starting pokem:
2024-06-10T19:18:56.407766Z ERROR sync_with_result_callback{sync_settings=SyncSettings { filter: FilterDefinition(FilterDefinition { event_fields: None, event_format: "client", presence: Filter { not_types: [], limit: None, senders: None, types: None, not_senders: [] }, account_data: Filter { not_types: [], limit: None, senders: None, types: None, not_senders: [] }, room: RoomFilter { include_leave: false, account_data: RoomEventFilter { not_types: [], not_rooms: [], limit: None, rooms: None, not_senders: [], senders: None, types: None, url_filter: None, lazy_load_options: Disabled, unread_thread_notifications: false }, timeline: RoomEventFilter { not_types: [], not_rooms: [], limit: None, rooms: None, not_senders: [], senders: None, types: None, url_filter: None, lazy_load_options: Disabled, unread_thread_notifications: false }, ephemeral: RoomEventFilter { not_types: [], not_rooms: [], limit: None, rooms: None, not_senders: [], senders: None, types: None, url_filter: None, lazy_load_options: Disabled, unread_thread_notifications: false }, state: RoomEventFilter { not_types: [], not_rooms: [], limit: None, rooms: None, not_senders: [], senders: None, types: None, url_filter: None, lazy_load_options: Enabled { include_redundant_members: false }, unread_thread_notifications: false }, not_rooms: [], rooms: None } }), timeout: 30s, full_state: false, set_presence: "online" }}: matrix_sdk::sync: Received an invalid response: error sending request for url (https://koehn.com/_matrix/client/v3/sync?filter=%7B%22room[redacted]lazy_load_members%22%3Atrue%7D%7D%7D&since=s1441094_165529100_166_2291035_28766_377_11969_3452118_0_28&timeout=30000): connection closed before message completed
Error: error sending request for url (https://koehn.com/_matrix/client/v3/sync?filter=%7B%22room[redacted]lazy_load_members%22%3Atrue%7D%7D%7D&since=s1441094_165529100_166_2291035_28766_377_11969_3452118_0_28&timeout=30000): connection closed before message completed
If I run curl
with that URL and the appropriate Authorization
header from the same machine, it returns in under a second.
Pokem is really handy. Thanks for building it!
It would be really nice if you could use HTTP headers for accessing various message options:
# markdown (or code)
curl --fail -d ‘This message **matters**’ -H ‘Format: markdown’ $URL
# file
curl --fail -d @filename.csv -H ‘Format: file’ $URL
# authentication
curl --fail -d ‘some content’ -H ‘Authentication: password123’ $URL
This, I think, is an improvement over putting the password into the URL, and allows you to extend the supported options in a forward-compatible way (e.g., you could add headers for text/notice/emote in later versions).
So to avoid spamming I've implemented a max room size setting, so that the owner of the daemon can limit the size of rooms that it responds in.
I don't want someone to add the bot to a giant room and then start spamming it, basically.
This issue exists to try to find a better or more flexible way of doing that. I haven't looked much at what other bots do.
Maybe the bot account has to be given elevated privileges in the room? Like, the bot account will message the room if it's under the given max size OR it has some elevated privilege level, which would allow room admins to enable the bot for a room.
We're not exactly pretending to be private, so it should be fine if we allow referencing the room by the room address instead of only using the internal room ID. e.g. pokem #pokem-example:jackson.dev Hello!
Hadn't gotten around to thinking about the usability much yet.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.