Compare commits
2 Commits
2a3449d0f2
...
55d2ef9c25
Author | SHA1 | Date | |
---|---|---|---|
55d2ef9c25 | |||
f37cbd1616 |
@ -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,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -6,12 +6,11 @@ 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,
|
||||||
this.start,
|
this.start,
|
||||||
this.end,
|
this.end,
|
||||||
});
|
});
|
||||||
final String to;
|
final String to;
|
||||||
final String id;
|
final String id;
|
||||||
|
Loading…
Reference in New Issue
Block a user