fixes
This commit is contained in:
		@@ -1560,12 +1560,12 @@ class VeilidFFI implements Veilid {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  Future<void> appCallReply(String id, Uint8List message) {
 | 
			
		||||
    final nativeId = id.toNativeUtf8();
 | 
			
		||||
  Future<void> appCallReply(String call_id, Uint8List message) {
 | 
			
		||||
    final nativeCallId = call_id.toNativeUtf8();
 | 
			
		||||
    final nativeEncodedMessage = base64UrlNoPadEncode(message).toNativeUtf8();
 | 
			
		||||
    final recvPort = ReceivePort("app_call_reply");
 | 
			
		||||
    final sendPort = recvPort.sendPort;
 | 
			
		||||
    _appCallReply(sendPort.nativePort, nativeId, nativeEncodedMessage);
 | 
			
		||||
    _appCallReply(sendPort.nativePort, nativeCallId, nativeEncodedMessage);
 | 
			
		||||
    return processFutureVoid(recvPort.first);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -580,10 +580,10 @@ class VeilidJS implements Veilid {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  Future<void> appCallReply(String id, Uint8List message) {
 | 
			
		||||
  Future<void> appCallReply(String callId, Uint8List message) {
 | 
			
		||||
    var encodedMessage = base64UrlNoPadEncode(message);
 | 
			
		||||
    return _wrapApiPromise(
 | 
			
		||||
        js_util.callMethod(wasm, "app_call_reply", [id, encodedMessage]));
 | 
			
		||||
        js_util.callMethod(wasm, "app_call_reply", [callId, encodedMessage]));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
 
 | 
			
		||||
@@ -262,7 +262,9 @@ abstract class VeilidUpdate {
 | 
			
		||||
      case "AppCall":
 | 
			
		||||
        {
 | 
			
		||||
          return VeilidAppCall(
 | 
			
		||||
              sender: json["sender"], message: json["message"], id: json["id"]);
 | 
			
		||||
              sender: json["sender"],
 | 
			
		||||
              message: json["message"],
 | 
			
		||||
              callId: json["call_id"]);
 | 
			
		||||
        }
 | 
			
		||||
      case "Attachment":
 | 
			
		||||
        {
 | 
			
		||||
@@ -348,22 +350,22 @@ class VeilidAppMessage implements VeilidUpdate {
 | 
			
		||||
class VeilidAppCall implements VeilidUpdate {
 | 
			
		||||
  final String? sender;
 | 
			
		||||
  final Uint8List message;
 | 
			
		||||
  final String id;
 | 
			
		||||
  final String callId;
 | 
			
		||||
 | 
			
		||||
  //
 | 
			
		||||
  VeilidAppCall({
 | 
			
		||||
    required this.sender,
 | 
			
		||||
    required this.message,
 | 
			
		||||
    required this.id,
 | 
			
		||||
    required this.callId,
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  Map<String, dynamic> toJson() {
 | 
			
		||||
    return {
 | 
			
		||||
      'kind': "AppMessage",
 | 
			
		||||
      'kind': "AppCall",
 | 
			
		||||
      'sender': sender,
 | 
			
		||||
      'message': base64UrlNoPadEncode(message),
 | 
			
		||||
      'id': id,
 | 
			
		||||
      'call_id': callId,
 | 
			
		||||
    };
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user