core: uid is now set in extra in client.sendMessage:

By setting `uid` in extra, it can now be specified by frontends.
This commit is contained in:
Goffi 2026-07-04 07:51:59 +02:00
commit 7696afb3d8
5 changed files with 14 additions and 18 deletions

View file

@ -164,7 +164,7 @@ class TestEmailGatewayComponent:
assert call_args[1] == {"": "Hello, world!\n"}
assert call_args[2] == None
client.sendMessage.assert_called_once_with(
to_jid, {"": "Hello, world!\n"}, None, extra={}, uid=None
to_jid, {"": "Hello, world!\n"}, None, extra={"uid": None}
)
@ed
@ -207,9 +207,9 @@ class TestEmailGatewayComponent:
"delivered": True,
}
],
}
},
"uid": None,
},
uid=None,
)
@ed
@ -275,8 +275,7 @@ class TestEmailGatewayComponent:
to_jid,
{"": "Hello, world!\n"},
None,
extra={"headers": {"keywords": "test, example", "urgency": "high"}},
uid=None,
extra={"headers": {"keywords": "test, example", "urgency": "high"}, "uid": None},
)
@ -316,7 +315,7 @@ class TestPubsubService:
"media_subtype": "octet-stream",
"size": 123,
"hash_algo": "sha-256",
"file_hash": "0123456789abcdef",
"file_hash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"created": 123,
},
{
@ -326,7 +325,7 @@ class TestPubsubService:
"media_subtype": "octet-stream",
"size": 456,
"hash_algo": "sha-256",
"file_hash": "0123456789abcdef",
"file_hash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"created": 123,
},
]