feat(wallet): wire real sendRaw() — Phase 2 complete
- RustTimeline.sendRaw() now calls inner.sendRaw() via custom SDK .aar - DefaultPaymentEventSender fully implemented: serializes payment data as JSON, sends co.sulkta.payment.request and co.sulkta.payment.status event types - matrix-rust-sdk.aar built from sulkta/send-raw-v1 fork with UniFFI binding - Removes UnsupportedOperationException stub — payments now actually send
This commit is contained in:
parent
0113f65c7a
commit
b867fa783e
2 changed files with 27 additions and 29 deletions
|
|
@ -280,15 +280,20 @@ class RustTimeline(
|
|||
}
|
||||
|
||||
/**
|
||||
* Send a raw/custom event. Currently not supported by the Rust SDK bindings.
|
||||
* The SDK Timeline does not expose sendRaw - custom events must use message markers for now.
|
||||
* Send a raw/custom event to the room.
|
||||
*
|
||||
* @param eventType The event type (e.g., "co.sulkta.payment.request")
|
||||
* @param content The JSON content of the event
|
||||
* @return Result indicating success or failure
|
||||
*/
|
||||
override suspend fun sendRaw(
|
||||
eventType: String,
|
||||
content: String,
|
||||
): Result<Unit> {
|
||||
// The Rust SDK Timeline interface does not expose sendRaw yet.
|
||||
return Result.failure(UnsupportedOperationException("sendRaw not yet supported by Matrix Rust SDK bindings"))
|
||||
): Result<Unit> = withContext(dispatcher) {
|
||||
runCatchingExceptions {
|
||||
inner.sendRaw(eventType, content)
|
||||
Unit
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun redactEvent(eventOrTransactionId: EventOrTransactionId, reason: String?): Result<Unit> = withContext(dispatcher) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue