Skip to content

Commit eda0faa

Browse files
committed
Prepare for version 4.0.3
1 parent 05c51f5 commit eda0faa

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

HISTORY.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
History
33
=======
44

5+
4.0.3 (2025-02-17)
6+
--------------------
7+
* Prepare XMPP messages linked to client stream.
8+
* Added CLI support for in-memory database in the XMPP server.
9+
* Added CLI support for custom connection timeout.
10+
* Fixed bug in XMPP sending method.
511

612
4.0.2 (2025-01-09)
713
--------------------

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
slixmpp==1.8.5
1+
slixmpp>=1.8.5
22
aiohttp>=3.10.4
33
aiohttp_jinja2==1.6
44
jinja2==3.0.3

spade/cli.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def cli():
2929
@click.option("--client_port", default=5222, help="Client port")
3030
@click.option("--server_port", default=5269, help="Server port")
3131
@click.option("--debug", is_flag=True, default=False, help="Enables debug mode")
32+
@click.option("--timeout", default=600, help="Connection timeout")
3233
@click.option(
3334
"--db",
3435
type=str,
@@ -37,9 +38,10 @@ def cli():
3738
help="Path for database file",
3839
)
3940
@click.option(
40-
"--purge", is_flag=True, help="Restore database file to default state (empty)"
41+
"--purge", is_flag=True, default=False, help="Restore database file to default state (empty)"
4142
)
42-
def run(host, client_port, server_port, debug, db, purge):
43+
@click.option("--memory", is_flag=True, default=False, help="Use an in-memory database")
44+
def run(host, client_port, server_port, debug, timeout, db, purge, memory):
4345
"""Launch an XMPP server"""
4446
if check_port_in_use(client_port, host):
4547
click.echo(f"Error: The port {client_port} is already in use.")
@@ -65,9 +67,10 @@ def run(host, client_port, server_port, debug, db, purge):
6567
host=host,
6668
client_port=client_port,
6769
server_port=server_port,
68-
connection_timeout=600,
70+
connection_timeout=timeout,
6971
database_path=db,
7072
database_purge=purge,
73+
database_in_memory=memory,
7174
)
7275

7376
print_spade_info()

0 commit comments

Comments
 (0)