Compare commits

..

No commits in common. "d5493a185a5dcc48beaf229c1055c570f3cde2ef" and "c850924dd3481a5922234918299633822dbce22b" have entirely different histories.

14 changed files with 62 additions and 74 deletions

View File

@ -69,7 +69,7 @@ class _MyHomePageState extends State<MyHomePage> {
RosterManager(),
PingManager(),
MessageManager(),
PresenceManager('http://moxxmpp.example'),
PresenceManager(),
])
..registerFeatureNegotiators([
ResourceBindingNegotiator(),

View File

@ -16,10 +16,10 @@ dependencies:
version: 0.1.4+1
moxxmpp:
hosted: https://git.polynom.me/api/packages/Moxxy/pub
version: 0.1.1
version: 0.1.0
moxxmpp_socket_tcp:
hosted: https://git.polynom.me/api/packages/Moxxy/pub
version: 0.1.1
version: 0.1.0
dev_dependencies:
flutter_test:

View File

@ -1,8 +1,3 @@
## 0.1.1
- **REFACTOR**: Move packages into packages/.
- **FEAT**: Fix moxxmpp_socket_tcp's pubspec.
## 0.1.0
- Initial version copied over from Moxxyv2

View File

@ -1,26 +1,26 @@
const smManager = 'im.moxxmpp.streammangementmanager';
const discoManager = 'im.moxxmpp.discomanager';
const messageManager = 'im.moxxmpp.messagemanager';
const rosterManager = 'im.moxxmpp.rostermanager';
const presenceManager = 'im.moxxmpp.presencemanager';
const csiManager = 'im.moxxmpp.csimanager';
const carbonsManager = 'im.moxxmpp.carbonsmanager';
const vcardManager = 'im.moxxmpp.vcardmanager';
const pubsubManager = 'im.moxxmpp.pubsubmanager';
const userAvatarManager = 'im.moxxmpp.useravatarmanager';
const stableIdManager = 'im.moxxmpp.stableidmanager';
const simsManager = 'im.moxxmpp.simsmanager';
const messageDeliveryReceiptManager = 'im.moxxmpp.messagedeliveryreceiptmanager';
const chatMarkerManager = 'im.moxxmpp.chatmarkermanager';
const oobManager = 'im.moxxmpp.oobmanager';
const sfsManager = 'im.moxxmpp.sfsmanager';
const messageRepliesManager = 'im.moxxmpp.messagerepliesmanager';
const blockingManager = 'im.moxxmpp.blockingmanager';
const httpFileUploadManager = 'im.moxxmpp.httpfileuploadmanager';
const chatStateManager = 'im.moxxmpp.chatstatemanager';
const pingManager = 'im.moxxmpp.ping';
const fileUploadNotificationManager = 'im.moxxmpp.fileuploadnotificationmanager';
const omemoManager = 'org.moxxmpp.omemomanager';
const emeManager = 'org.moxxmpp.ememanager';
const cryptographicHashManager = 'org.moxxmpp.cryptographichashmanager';
const delayedDeliveryManager = 'org.moxxmpp.delayeddeliverymanager';
const smManager = 'im.moxxy.streammangementmanager';
const discoManager = 'im.moxxy.discomanager';
const messageManager = 'im.moxxy.messagemanager';
const rosterManager = 'im.moxxy.rostermanager';
const presenceManager = 'im.moxxy.presencemanager';
const csiManager = 'im.moxxy.csimanager';
const carbonsManager = 'im.moxxy.carbonsmanager';
const vcardManager = 'im.moxxy.vcardmanager';
const pubsubManager = 'im.moxxy.pubsubmanager';
const userAvatarManager = 'im.moxxy.useravatarmanager';
const stableIdManager = 'im.moxxy.stableidmanager';
const simsManager = 'im.moxxy.simsmanager';
const messageDeliveryReceiptManager = 'im.moxxy.messagedeliveryreceiptmanager';
const chatMarkerManager = 'im.moxxy.chatmarkermanager';
const oobManager = 'im.moxxy.oobmanager';
const sfsManager = 'im.moxxy.sfsmanager';
const messageRepliesManager = 'im.moxxy.messagerepliesmanager';
const blockingManager = 'im.moxxy.blockingmanager';
const httpFileUploadManager = 'im.moxxy.httpfileuploadmanager';
const chatStateManager = 'im.moxxy.chatstatemanager';
const pingManager = 'im.moxxy.ping';
const fileUploadNotificationManager = 'im.moxxy.fileuploadnotificationmanager';
const omemoManager = 'org.moxxy.omemomanager';
const emeManager = 'org.moxxy.ememanager';
const cryptographicHashManager = 'org.moxxy.cryptographichashmanager';
const delayedDeliveryManager = 'org.moxxy.delayeddeliverymanager';

View File

@ -1,9 +1,9 @@
const saslPlainNegotiator = 'im.moxxmpp.sasl.plain';
const saslScramSha1Negotiator = 'im.moxxmpp.sasl.scram.sha1';
const saslScramSha256Negotiator = 'im.moxxmpp.sasl.scram.sha256';
const saslScramSha512Negotiator = 'im.moxxmpp.sasl.scram.sha512';
const csiNegotiator = 'im.moxxmpp.xeps.csi';
const rosterNegotiator = 'im.moxxmpp.core.roster';
const resourceBindingNegotiator = 'im.moxxmpp.core.resource';
const streamManagementNegotiator = 'im.moxxmpp.xeps.sm';
const startTlsNegotiator = 'im.moxxmpp.core.starttls';
const saslPlainNegotiator = 'im.moxxy.sasl.plain';
const saslScramSha1Negotiator = 'im.moxxy.sasl.scram.sha1';
const saslScramSha256Negotiator = 'im.moxxy.sasl.scram.sha256';
const saslScramSha512Negotiator = 'im.moxxy.sasl.scram.sha512';
const csiNegotiator = 'im.moxxy.xeps.csi';
const rosterNegotiator = 'im.moxxy.core.roster';
const resourceBindingNegotiator = 'im.moxxy.core.resource';
const streamManagementNegotiator = 'im.moxxy.xeps.sm';
const startTlsNegotiator = 'im.moxxy.core.starttls';

View File

@ -14,11 +14,9 @@ import 'package:moxxmpp/src/xeps/xep_0115.dart';
import 'package:moxxmpp/src/xeps/xep_0414.dart';
class PresenceManager extends XmppManagerBase {
PresenceManager(this._capHashNode) : _capabilityHash = null, super();
String? _capabilityHash;
final String _capHashNode;
String get capabilityHashNode => _capHashNode;
PresenceManager() : _capabilityHash = null, super();
String? _capabilityHash;
@override
String getId() => presenceManager;
@ -95,7 +93,7 @@ class PresenceManager extends XmppManagerBase {
xmlns: capsXmlns,
attributes: {
'hash': 'sha-1',
'node': _capHashNode,
'node': 'http://moxxy.im',
'ver': await getCapabilityHash()
},
)

View File

@ -157,7 +157,7 @@ class DiscoManager extends XmppManagerBase {
final query = stanza.firstTag('query')!;
final node = query.attributes['node'] as String?;
final capHash = await presence.getCapabilityHash();
final isCapabilityNode = node == '${presence.capabilityHashNode}#$capHash';
final isCapabilityNode = node == 'http://moxxy.im#$capHash';
if (!isCapabilityNode && node != null) {
await getAttributes().sendStanza(Stanza.iq(
@ -200,7 +200,7 @@ class DiscoManager extends XmppManagerBase {
xmlns: discoInfoXmlns,
attributes: {
...!isCapabilityNode ? {} : {
'node': '${presence.capabilityHashNode}#$capHash'
'node': 'http://moxxy.im#$capHash'
}
},
children: [

View File

@ -1,11 +1,11 @@
name: moxxmpp
description: A pure-Dart XMPP library
version: 0.1.1
version: 0.1.0
homepage: https://codeberg.org/moxxy/moxxmpp
publish_to: https://git.polynom.me/api/packages/Moxxy/pub
environment:
sdk: '>=2.17.5 <3.0.0'
sdk: '>=2.18.0 <3.0.0'
dependencies:
cryptography: ^2.0.5

View File

@ -60,7 +60,7 @@ void main() {
StubNegotiator2(),
])
..registerManagers([
PresenceManager('http://moxxmpp.example'),
PresenceManager(),
RosterManager(),
DiscoManager(),
PingManager(),

View File

@ -53,7 +53,7 @@ void main() {
ignoreId: true,
),
StringExpectation(
"<presence xmlns='jabber:client' from='polynomdivision@test.server/MU29eEZn'><show>chat</show><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://moxxmpp.example' ver='QRTBC5cg/oYd+UOTYazSQR4zb/I=' /></presence>",
"<presence xmlns='jabber:client' from='polynomdivision@test.server/MU29eEZn'><show>chat</show><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://moxxy.im' ver='QRTBC5cg/oYd+UOTYazSQR4zb/I=' /></presence>",
'',
),
StanzaExpectation(
@ -73,7 +73,7 @@ void main() {
allowPlainAuth: true,
),);
conn.registerManagers([
PresenceManager('http://moxxmpp.example'),
PresenceManager(),
RosterManager(),
DiscoManager(),
PingManager(),

View File

@ -242,7 +242,7 @@ void main() {
),);
final sm = StreamManagementManager();
conn.registerManagers([
PresenceManager('http://moxxmpp.example'),
PresenceManager(),
RosterManager(),
DiscoManager(),
PingManager(),
@ -343,7 +343,7 @@ void main() {
'<enabled xmlns="urn:xmpp:sm:3" id="some-long-sm-id" resume="true" />',
),
StringExpectation(
"<presence xmlns='jabber:client' from='polynomdivision@test.server/MU29eEZn'><show>chat</show><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://moxxmpp.example' ver='QRTBC5cg/oYd+UOTYazSQR4zb/I=' /></presence>",
"<presence xmlns='jabber:client' from='polynomdivision@test.server/MU29eEZn'><show>chat</show><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://moxxy.im' ver='QRTBC5cg/oYd+UOTYazSQR4zb/I=' /></presence>",
'<iq type="result" />',
),
StanzaExpectation(
@ -364,7 +364,7 @@ void main() {
),);
final sm = StreamManagementManager();
conn.registerManagers([
PresenceManager('http://moxxmpp.example'),
PresenceManager(),
RosterManager(),
DiscoManager(),
PingManager(),
@ -518,7 +518,7 @@ void main() {
allowPlainAuth: true,
),);
conn.registerManagers([
PresenceManager('http://moxxmpp.example'),
PresenceManager(),
RosterManager(),
DiscoManager(),
PingManager(),
@ -610,7 +610,7 @@ void main() {
allowPlainAuth: true,
),);
conn.registerManagers([
PresenceManager('http://moxxmpp.example'),
PresenceManager(),
RosterManager(),
DiscoManager(),
PingManager(),
@ -702,7 +702,7 @@ void main() {
allowPlainAuth: true,
),);
conn.registerManagers([
PresenceManager('http://moxxmpp.example'),
PresenceManager(),
RosterManager(),
DiscoManager(),
PingManager(),

View File

@ -104,7 +104,7 @@ void main() {
attributes: {
// TODO: Somehow make the test ignore this attribute
'ver': 'QRTBC5cg/oYd+UOTYazSQR4zb/I=',
'node': 'http://moxxmpp.example',
'node': 'http://moxxy.im',
'hash': 'sha-1'
},
)
@ -126,7 +126,7 @@ void main() {
allowPlainAuth: true,
),);
conn.registerManagers([
PresenceManager('http://moxxmpp.example'),
PresenceManager(),
RosterManager(),
DiscoManager(),
PingManager(),
@ -180,7 +180,7 @@ void main() {
allowPlainAuth: true,
),);
conn.registerManagers([
PresenceManager('http://moxxmpp.example'),
PresenceManager(),
RosterManager(),
DiscoManager(),
PingManager(),
@ -234,7 +234,7 @@ void main() {
allowPlainAuth: true,
),);
conn.registerManagers([
PresenceManager('http://moxxmpp.example'),
PresenceManager(),
RosterManager(),
DiscoManager(),
PingManager(),
@ -289,7 +289,7 @@ void main() {
allowPlainAuth: false,
),);
conn.registerManagers([
PresenceManager('http://moxxmpp.example'),
PresenceManager(),
RosterManager(),
DiscoManager(),
PingManager(),

View File

@ -1,8 +1,3 @@
## 0.1.1
- **REFACTOR**: Move packages into packages/.
- **FEAT**: Fix moxxmpp_socket_tcp's pubspec.
## 0.1.0
- Initial version.

View File

@ -1,18 +1,18 @@
name: moxxmpp_socket_tcp
description: A socket for moxxmpp using TCP that implements the RFC6120 connection algorithm and XEP-0368
version: 0.1.1
version: 0.1.0
homepage: https://codeberg.org/moxxy/moxxmpp
publish_to: https://git.polynom.me/api/packages/Moxxy/pub
environment:
sdk: '>=2.17.5 <3.0.0'
sdk: '>=2.18.0 <3.0.0'
dependencies:
logging: ^1.0.2
meta: ^1.6.0
moxxmpp:
hosted: https://git.polynom.me/api/packages/Moxxy/pub
version: ^0.1.1
version: ^0.1.0
dev_dependencies:
lints: ^2.0.0