feat(core): Add a shorthand for MessageEvent.extensions.get
This commit is contained in:
parent
4ff2992a03
commit
e234c812ff
@ -92,6 +92,9 @@ class MessageEvent extends XmppEvent {
|
|||||||
|
|
||||||
/// Data added by other handlers.
|
/// Data added by other handlers.
|
||||||
final TypedMap<StanzaHandlerExtension> extensions;
|
final TypedMap<StanzaHandlerExtension> extensions;
|
||||||
|
|
||||||
|
/// Shorthand for extensions.get<T>().
|
||||||
|
T? get<T>() => extensions.get<T>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Triggered when a client responds to our delivery receipt request
|
/// Triggered when a client responds to our delivery receipt request
|
||||||
|
Loading…
Reference in New Issue
Block a user