Commit graph cusku/src
Author SHA1 Message Date
pep
72a3e5a188
config: custom deserializer for nickname
It looks like the current toml crate doesn't allow borrowed strings?
See https://gitlab.com/xmpp-rs/xmpp-rs/-/merge_requests/638.

This is happening after xmpp-rs' 60bf821c63.

Signed-off-by: pep <pep@bouah.net>
2026-01-01 01:18:45 +01:00
pep
8dfb89fe38
bot: resync on 'rejoin' rather than leave and join
The xmpp crate doesn't yet have mechanisms to wait for the next incoming
presence and so the `leave_room` method returns after the unavailable
presence has been set. Thus the code may still think it's being joined
when it pretty soon going not to be.

Instead, we chose to send another join presence to signal the MUC we
want to get the full state again (occupants, subject), without leaving.

Signed-off-by: pep <pep@bouah.net>
2025-12-28 19:12:31 +01:00
pep
ea62a41b78 Add command to rejoin rooms
Signed-off-by: pep <pep@bouah.net>
2025-12-27 14:31:32 +01:00
pep
478780d063 Add 'admins' config option to be used later on
Signed-off-by: pep <pep@bouah.net>
2025-12-27 14:31:32 +01:00
pep
caa92227b2 fmt update?
Signed-off-by: pep <pep@bouah.net>
2025-12-27 14:31:32 +01:00
pep
1c3af01142
hooks: Remove restriction to be published on main
Signed-off-by: pep <pep@bouah.net>
2025-12-17 16:01:55 +01:00
pep
04bae8dc0c
bot: Display debug end even if hook hasn't been processed
Signed-off-by: pep <pep@bouah.net>
2025-12-17 16:01:23 +01:00
pep
eb0b7ff020
Don't follow bookmarks autojoin config
If this flag is enabled, the library expects bookmarks to be added to
the account itself, and when there's no bookmark for a room, the
corresponding room is automatically left. This doesn't work in the case
where many instances of the bot are on the same account.

It may work in the future if support for various sets of rooms/hooks are
added, but for the moment it seemed easier (and maybe also more useful
for other users of the xmpp-rs lib) to implement this.

Signed-off-by: pep <pep@bouah.net>
2025-11-15 22:00:26 +01:00
pep
3589fe6348
Update edition to 2024
And remove unstable let_chains feature which isn't needed anymore.

Signed-off-by: pep <pep@bouah.net>
2025-07-19 23:03:51 +02:00
pep
f712816c9b
Remove unused unstable feature
Forgot to remove it with e064263f96.

Signed-off-by: pep <pep@bouah.net>
2025-07-19 23:01:43 +02:00
pep
7eb6f190b2
Update xmpp-rs dep to e3a4aae42d9 with rustls fix
Signed-off-by: pep <pep@bouah.net>
2025-05-11 21:48:50 +02:00
pep
b97b5373ba
Use ForgejoHook::try_from_event
Signed-off-by: pep <pep@bouah.net>
2025-05-04 00:25:16 +02:00
pep
ca6990114b
Handle closing issues
Signed-off-by: pep <pep@bouah.net>
2025-05-03 22:15:39 +02:00
pep
e064263f96 Cleanly shutdown on ctrl_c
Signed-off-by: pep <pep@bouah.net>
2025-05-03 17:46:29 +02:00
pep
f90b152abf
Add support for issue comments
Signed-off-by: pep <pep@bouah.net>
2025-05-03 17:33:16 +02:00
pep
29881089d3
Update xmpp-rs upstream to 23c947d081
Signed-off-by: pep <pep@bouah.net>
2025-05-03 12:32:06 +02:00
pep
12330e736d
cusku::hooks::forgejo: Add url to be displayed
Signed-off-by: pep <pep@bouah.net>
2025-04-19 14:30:10 +02:00
pep
14d03272dd
cusku::hooks::forgejo: Use IssueAttrs.numbers rather than Issue.number
Signed-off-by: pep <pep@bouah.net>
2025-04-19 14:28:33 +02:00
pep
5b5de13db0 Allow deprecated elements from gitlab crate
We know they exist. There's no obvious replacement for the moment, so
they'll just stop working when they stop working.

Signed-off-by: pep <pep@bouah.net>
2025-03-11 12:40:35 +01:00
pep
4e0eea9e6c rustfmt for previous commit
Missed it, and it had been pushed for a long time.

Signed-off-by: pep <pep@bouah.net>
2025-03-11 12:40:17 +01:00
pep
9eeca94366
Update to xmpp-rs (ec72d71551) to get serde support for ResourcePart
Signed-off-by: pep <pep@bouah.net>
2024-12-29 21:06:13 +01:00
pep
c29e87be03 Update xmpp dep to main (5bc94dce95)
Signed-off-by: pep <pep@bouah.net>
2024-12-19 23:59:28 +01:00
pep
161c259dee rustfmt
Signed-off-by: pep <pep@bouah.net>
2024-12-19 23:59:28 +01:00
pep
d16ead8bc9
Split web and xmpp parts into different tasks
Signed-off-by: pep <pep@bouah.net>
2024-11-21 17:11:43 +01:00
pep
fc0b13079f Add support for ForgejoHook::Issue
Signed-off-by: pep <pep@bouah.net>
2024-09-04 23:49:16 +02:00
pep
468b42abfd Add trace log for payloads
Signed-off-by: pep <pep@bouah.net>
2024-09-04 23:49:16 +02:00
pep
f6b031eb1f Remove unused Arc/Mutex
Signed-off-by: pep <pep@bouah.net>
2024-09-04 23:45:48 +02:00
Maxime “pep” Buquet
db88921290 Readd support for GitlabHook::WikiPage
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
Maxime “pep” Buquet
4e330adb6b Remove incomplete support for GitlabHook::Build
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
Maxime “pep” Buquet
4bbb3f8994 Split hook modules
Some structs changed to public on the way to facilitate writes.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
Maxime “pep” Buquet
2f101c617c Rename hook module to hooks
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
Maxime “pep” Buquet
b281cf8b44 Readd support for Gitlab's NoteHook
Trying to reuse other converters so that we don't have to redo all the
work

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
Maxime “pep” Buquet
6e6ed92026 hook: Reimplement Hook::Issue for Gitlab
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
Maxime “pep” Buquet
bcc8728cc8 Refactor hook module to also format Forgejo stuff
Temporarily disable some Gitlab features

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-09-04 20:35:05 +02:00
Maxime “pep” Buquet
77c193bfb6 Update to xmpp main (274baaef9afb)
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-08-31 00:40:37 +02:00
7b63e24168
Update to xmpp 0.6
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-08-31 00:39:49 +02:00
ac67c52bee Remove unsafe 2024-08-21 00:11:55 +02:00
94ac2d8818
Save when not is_online
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-08-21 00:11:37 +02:00
6285c0b1a4 Async file read 2024-08-21 00:07:26 +02:00
66e4131bd3 Use Utf8PathBuf
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-08-20 23:47:48 +02:00
ad3bcc88de Move Config to config module 2024-08-20 23:45:00 +02:00
ee4c0a0275 Use Display not Debug for error message 2024-08-20 23:45:00 +02:00
09df210c17 Add per-error HTTP status code 2024-08-20 23:45:00 +02:00
f70b5f8aa1 Don't crash for unknown MR action 2024-08-20 23:45:00 +02:00
f9e6b91451 Log what HTTP method was wrong 2024-08-20 23:45:00 +02:00
Maxime “pep” Buquet
0c1627e726
Move unreachable debug statement
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-26 18:47:24 +02:00
Maxime “pep” Buquet
c707aa5c35
Gitlab Webhook: Support tag pushes
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-24 19:47:01 +02:00
Maxime “pep” Buquet
edd0e0074a
Don't calculate sig for payloads that don't need it
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-24 19:44:10 +02:00
Maxime “pep” Buquet
a9a16c30bf
Add debug statements to know which branch got triggered
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-14 01:03:15 +02:00
Maxime “pep” Buquet
9f55b37f34
Add debug statements to know which branch got triggered
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-14 01:02:35 +02:00