Commit graph

84 commits

Author SHA1 Message Date
5be165e08a
Cargo.toml: Add myself as author
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-27 11:41:05 +01:00
ff9e172927
test/templates: change new_room signature
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-27 11:15:30 +01:00
ce640864ca
Session::filter_presence: block muc#admin; add TODO
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-27 09:40:35 +01:00
c159f0b735
CI: try moving clippy in testing stage
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-27 09:19:46 +01:00
c50e3adec6
CI: fail on clippy warnings
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-27 09:14:03 +01:00
c9be530c56
tests: Remove redundant info in names
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-27 08:47:15 +01:00
9bd4adc880
tests/presence: Split MSN tests
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-27 08:44:29 +01:00
7472bc1398
tests/presence: implement updated_joined
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-27 00:33:39 +01:00
db764b18f7
session: implement filter_presence
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-27 00:21:10 +01:00
1b74fce690
Occupant: Allow any session to be updated always
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-26 16:54:06 +01:00
cca88740c7
Session: restore PartialEq impl as it was
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-26 16:39:25 +01:00
5239a19871
Use PresenceFull where necessary
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-26 15:02:45 +01:00
65c7383745
session: Remove two FullJids from Session
They're already stored in the presence we own and we can get them for
free.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-26 14:59:09 +01:00
6e73112251 handlers: split presence handler
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-26 14:20:49 +01:00
28186d77d2 presence: PresenceFull newtype
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-26 14:20:49 +01:00
38838991c0
Use 'primary' for MSN terminology instead of 'leader'
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-25 00:40:14 +01:00
b0fe077449
tests/presence: test_presence_leave_msn
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-23 22:52:45 +01:00
a86a85cf19
test/templates: new_room method
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-23 22:43:09 +01:00
6fb526a14c
README: Update checklist with new features and new TODOs
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-17 16:58:25 +01:00
d0570afeaf
Update deprecated chrono::east call to east_opt
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-17 14:12:50 +01:00
9b7d3fd9f9
Reject presence updates when not joined (gc1 joins)
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-17 14:06:06 +01:00
132757c8b3
handlers: pinging room unsupported until affiliations are implemented
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-16 10:23:56 +01:00
2a2d8cd051
Split Occupant and Session into their own module
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-08 12:05:28 +01:00
1463a55d3f
TestComponent: Make order of stanza unimportant across different resources
Split expected stanza by resource thus rendering order of stanza across
different resource unimportant.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-12-05 21:00:15 +01:00
2b6a151f7e
room: Remove derived Eq on Session
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-11-30 17:26:54 +01:00
1ada7f8bf4
tests/presence: todo!(): test_presence_update_not_joined, test_presence_leave_msn
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-10-16 21:39:57 +02:00
a2cc7857b7
room: test_occupant_update_presence
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-10-16 19:38:49 +02:00
fc880c7423
Occupant now takes a presence; new Session struct
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-10-16 15:08:23 +02:00
43d2697aaa
error: Add Error::Jid(Box<JidParseError>)
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-10-16 10:57:24 +02:00
4d00060817
TestComponent: Display assert errors as Display not Debug for easier xml coloring
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-10-15 19:05:12 +02:00
dc9a56857c
room/Occupant: Add docstrings
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-30 18:39:00 +02:00
d94d472b9d
error: add docstrings
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-30 17:10:52 +02:00
bcc2f7d85e room/broadcast_presence: move matches! blocks together
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-28 18:10:34 +02:00
d7c4bcd87b Broadcast presence updates
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-28 18:10:34 +02:00
222e5a1793 tests: add templates and use in tests
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-28 18:09:28 +02:00
cc1c1609e3 component: Split into submodules test/xmpp
This way I don't have to guard everything with #[cfg(test)]..

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-26 17:32:28 +02:00
1f7112616a
component: Update copyright header
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-25 23:11:41 +02:00
be5f5fb4e5
README: Add TODO: nick changes
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-25 16:25:39 +02:00
12d23e2283 room: clippy
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-25 16:03:29 +02:00
3b59bd1312 main: Remove unused import
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-25 16:03:29 +02:00
4fff51e9a1 error: clippy; gain 128 bytes on Error
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-25 16:03:29 +02:00
55f0759d70 handlers: clippy
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-25 16:03:29 +02:00
836bfcd7dd
TestComponent: Use is_empty instead of .len == 0
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-25 16:03:20 +02:00
0252aece38
component: guard with #[cfg(test)] what's only used in tests
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-24 17:22:19 +02:00
b2da2495a1
CI: Add required musl-dev
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-24 13:51:40 +02:00
be1930c584
tests/iq: test_self_ping_answer
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-24 02:13:30 +02:00
da12752d50
Cargo.toml: Remove custom paths for xmpp-rs deps
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-24 01:57:14 +02:00
8322f5e11f cargo fmt
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-24 01:46:32 +02:00
1f4e6f6451 Partial XEP-0410 support
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-24 01:46:32 +02:00
eba5ea9773 TestComponent: rename _send_stanza method
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-09-24 01:46:32 +02:00