Compare commits

..

2 Commits

2 changed files with 9 additions and 8 deletions

View File

@ -252,10 +252,11 @@ class StickersManager extends XmppManagerBase {
); );
} }
/// Publishes the StickerPack [pack] to the PubSub node of [jid]. /// Publishes the StickerPack [pack] to the PubSub node of [jid]. If specified, then
/// [accessModel] will be used as the PubSub node's access model.
/// ///
/// On success, returns true. On failure, returns a PubSubError. /// On success, returns true. On failure, returns a PubSubError.
Future<Result<PubSubError, bool>> publishStickerPack(JID jid, StickerPack pack) async { Future<Result<PubSubError, bool>> publishStickerPack(JID jid, StickerPack pack, { String? accessModel }) async {
assert(pack.id != '', 'The sticker pack must have an id'); assert(pack.id != '', 'The sticker pack must have an id');
final pm = getAttributes().getManagerById<PubSubManager>(pubsubManager)!; final pm = getAttributes().getManagerById<PubSubManager>(pubsubManager)!;
@ -264,8 +265,9 @@ class StickersManager extends XmppManagerBase {
stickersXmlns, stickersXmlns,
pack.toXML(), pack.toXML(),
id: pack.id, id: pack.id,
options: const PubSubPublishOptions( options: PubSubPublishOptions(
maxItems: 'max', maxItems: 'max',
accessModel: accessModel,
), ),
); );
} }

View File

@ -6,7 +6,6 @@ import 'package:moxxmpp/src/namespaces.dart';
import 'package:moxxmpp/src/stanza.dart'; import 'package:moxxmpp/src/stanza.dart';
class ReplyData { class ReplyData {
const ReplyData({ const ReplyData({
required this.to, required this.to,
required this.id, required this.id,