feat(core): Add encryption info to MessageEvent
This commit is contained in:
		
							parent
							
								
									e234c812ff
								
							
						
					
					
						commit
						8266765ff8
					
				@ -71,9 +71,11 @@ class MessageEvent extends XmppEvent {
 | 
			
		||||
    this.from,
 | 
			
		||||
    this.to,
 | 
			
		||||
    this.id,
 | 
			
		||||
    this.encrypted,
 | 
			
		||||
    this.extensions, {
 | 
			
		||||
    this.type,
 | 
			
		||||
    this.error,
 | 
			
		||||
    this.encryptionError,
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  /// The from attribute of the message.
 | 
			
		||||
@ -90,6 +92,12 @@ class MessageEvent extends XmppEvent {
 | 
			
		||||
 | 
			
		||||
  final StanzaError? error;
 | 
			
		||||
 | 
			
		||||
  /// Flag indicating whether the message was encrypted.
 | 
			
		||||
  final bool encrypted;
 | 
			
		||||
 | 
			
		||||
  /// The error in case an encryption error occurred.
 | 
			
		||||
  final Object? encryptionError;
 | 
			
		||||
 | 
			
		||||
  /// Data added by other handlers.
 | 
			
		||||
  final TypedMap<StanzaHandlerExtension> extensions;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -81,9 +81,11 @@ class MessageManager extends XmppManagerBase {
 | 
			
		||||
        JID.fromString(state.stanza.attributes['from']! as String),
 | 
			
		||||
        JID.fromString(state.stanza.attributes['to']! as String),
 | 
			
		||||
        state.stanza.attributes['id']! as String,
 | 
			
		||||
        state.encrypted,
 | 
			
		||||
        state.extensions,
 | 
			
		||||
        type: state.stanza.attributes['type'] as String?,
 | 
			
		||||
        error: StanzaError.fromStanza(state.stanza),
 | 
			
		||||
        encryptionError: state.encryptionError,
 | 
			
		||||
      ),
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user