Compare commits
No commits in common. "138edffb0a979c9adc341b5b8d47151e1637c51a" and "3b7ded3b96843f358a84c5f35a4fca18a8718990" have entirely different histories.
138edffb0a
...
3b7ded3b96
@ -16,10 +16,10 @@ dependencies:
|
|||||||
version: 0.1.4+1
|
version: 0.1.4+1
|
||||||
moxxmpp:
|
moxxmpp:
|
||||||
hosted: https://git.polynom.me/api/packages/Moxxy/pub
|
hosted: https://git.polynom.me/api/packages/Moxxy/pub
|
||||||
version: 0.1.5
|
version: 0.1.3+1
|
||||||
moxxmpp_socket_tcp:
|
moxxmpp_socket_tcp:
|
||||||
hosted: https://git.polynom.me/api/packages/Moxxy/pub
|
hosted: https://git.polynom.me/api/packages/Moxxy/pub
|
||||||
version: 0.1.2+7
|
version: 0.1.2+5
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
@ -1,12 +1,3 @@
|
|||||||
## 0.1.5
|
|
||||||
|
|
||||||
- **FEAT**: Message events now contain the stanza error, if available.
|
|
||||||
|
|
||||||
## 0.1.4
|
|
||||||
|
|
||||||
- **FIX**: Only stanza-id required 'sid:0' support.
|
|
||||||
- **FEAT**: Implement parsing and sending of retractions.
|
|
||||||
|
|
||||||
## 0.1.3+1
|
## 0.1.3+1
|
||||||
|
|
||||||
- **FIX**: Expose the error classes.
|
- **FIX**: Expose the error classes.
|
||||||
|
@ -63,7 +63,6 @@ class MessageEvent extends XmppEvent {
|
|||||||
required this.isMarkable,
|
required this.isMarkable,
|
||||||
required this.encrypted,
|
required this.encrypted,
|
||||||
required this.other,
|
required this.other,
|
||||||
this.error,
|
|
||||||
this.type,
|
this.type,
|
||||||
this.oob,
|
this.oob,
|
||||||
this.sfs,
|
this.sfs,
|
||||||
@ -75,7 +74,6 @@ class MessageEvent extends XmppEvent {
|
|||||||
this.funCancellation,
|
this.funCancellation,
|
||||||
this.messageRetraction,
|
this.messageRetraction,
|
||||||
});
|
});
|
||||||
final StanzaError? error;
|
|
||||||
final String body;
|
final String body;
|
||||||
final JID fromJid;
|
final JID fromJid;
|
||||||
final JID toJid;
|
final JID toJid;
|
||||||
|
@ -99,7 +99,6 @@ class MessageManager extends XmppManagerBase {
|
|||||||
encrypted: state.encrypted,
|
encrypted: state.encrypted,
|
||||||
messageRetraction: state.messageRetraction,
|
messageRetraction: state.messageRetraction,
|
||||||
other: state.other,
|
other: state.other,
|
||||||
error: StanzaError.fromStanza(message),
|
|
||||||
),);
|
),);
|
||||||
|
|
||||||
return state.copyWith(done: true);
|
return state.copyWith(done: true);
|
||||||
|
@ -1,28 +1,6 @@
|
|||||||
import 'package:moxxmpp/src/namespaces.dart';
|
import 'package:moxxmpp/src/namespaces.dart';
|
||||||
import 'package:moxxmpp/src/stringxml.dart';
|
import 'package:moxxmpp/src/stringxml.dart';
|
||||||
|
|
||||||
/// A simple description of the <error /> element that may be inside a stanza
|
|
||||||
class StanzaError {
|
|
||||||
StanzaError(this.type, this.error);
|
|
||||||
String type;
|
|
||||||
String error;
|
|
||||||
|
|
||||||
/// Returns a StanzaError if [stanza] contains a <error /> element. If not, returns
|
|
||||||
/// null.
|
|
||||||
static StanzaError? fromStanza(Stanza stanza) {
|
|
||||||
final error = stanza.firstTag('error');
|
|
||||||
if (error == null) return null;
|
|
||||||
|
|
||||||
final stanzaError = error.firstTagByXmlns(fullStanzaXmlns);
|
|
||||||
if (stanzaError == null) return null;
|
|
||||||
|
|
||||||
return StanzaError(
|
|
||||||
error.attributes['type']! as String,
|
|
||||||
stanzaError.tag,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class Stanza extends XMLNode {
|
class Stanza extends XMLNode {
|
||||||
// ignore: use_super_parameters
|
// ignore: use_super_parameters
|
||||||
Stanza({ this.to, this.from, this.type, this.id, List<XMLNode> children = const [], required String tag, Map<String, String> attributes = const {} }) : super(
|
Stanza({ this.to, this.from, this.type, this.id, List<XMLNode> children = const [], required String tag, Map<String, String> attributes = const {} }) : super(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: moxxmpp
|
name: moxxmpp
|
||||||
description: A pure-Dart XMPP library
|
description: A pure-Dart XMPP library
|
||||||
version: 0.1.5
|
version: 0.1.3+1
|
||||||
homepage: https://codeberg.org/moxxy/moxxmpp
|
homepage: https://codeberg.org/moxxy/moxxmpp
|
||||||
publish_to: https://git.polynom.me/api/packages/Moxxy/pub
|
publish_to: https://git.polynom.me/api/packages/Moxxy/pub
|
||||||
|
|
||||||
@ -31,6 +31,6 @@ dev_dependencies:
|
|||||||
build_runner: ^2.1.11
|
build_runner: ^2.1.11
|
||||||
moxxmpp_socket_tcp:
|
moxxmpp_socket_tcp:
|
||||||
hosted: https://git.polynom.me/api/packages/Moxxy/pub
|
hosted: https://git.polynom.me/api/packages/Moxxy/pub
|
||||||
version: ^0.1.2+7
|
version: ^0.1.2+5
|
||||||
test: ^1.16.0
|
test: ^1.16.0
|
||||||
very_good_analysis: ^3.0.1
|
very_good_analysis: ^3.0.1
|
||||||
|
@ -1,11 +1,3 @@
|
|||||||
## 0.1.2+7
|
|
||||||
|
|
||||||
- Update a dependency to the latest release.
|
|
||||||
|
|
||||||
## 0.1.2+6
|
|
||||||
|
|
||||||
- Update a dependency to the latest release.
|
|
||||||
|
|
||||||
## 0.1.2+5
|
## 0.1.2+5
|
||||||
|
|
||||||
- Update a dependency to the latest release.
|
- Update a dependency to the latest release.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: moxxmpp_socket_tcp
|
name: moxxmpp_socket_tcp
|
||||||
description: A socket for moxxmpp using TCP that implements the RFC6120 connection algorithm and XEP-0368
|
description: A socket for moxxmpp using TCP that implements the RFC6120 connection algorithm and XEP-0368
|
||||||
version: 0.1.2+7
|
version: 0.1.2+5
|
||||||
homepage: https://codeberg.org/moxxy/moxxmpp
|
homepage: https://codeberg.org/moxxy/moxxmpp
|
||||||
publish_to: https://git.polynom.me/api/packages/Moxxy/pub
|
publish_to: https://git.polynom.me/api/packages/Moxxy/pub
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ dependencies:
|
|||||||
meta: ^1.6.0
|
meta: ^1.6.0
|
||||||
moxxmpp:
|
moxxmpp:
|
||||||
hosted: https://git.polynom.me/api/packages/Moxxy/pub
|
hosted: https://git.polynom.me/api/packages/Moxxy/pub
|
||||||
version: ^0.1.5
|
version: ^0.1.3+1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
lints: ^2.0.0
|
lints: ^2.0.0
|
||||||
|
Loading…
Reference in New Issue
Block a user