mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-09 10:19:41 +02:00
Merge branch '4.4'
This commit is contained in:
commit
0c013e4f29
5 changed files with 46 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright 2020 Florian Schmaus
|
||||
* Copyright 2020-2021 Florian Schmaus
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -17,7 +17,7 @@
|
|||
package org.jivesoftware.smackx.bob.element;
|
||||
|
||||
import org.jivesoftware.smack.packet.ExtensionElement;
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.packet.StanzaView;
|
||||
import org.jivesoftware.smack.util.Objects;
|
||||
import org.jivesoftware.smack.util.XmlStringBuilder;
|
||||
import org.jivesoftware.smackx.bob.BoBData;
|
||||
|
@ -94,8 +94,8 @@ public class BoBDataExtension implements ExtensionElement {
|
|||
return xml;
|
||||
}
|
||||
|
||||
public static BoBDataExtension from(Message message) {
|
||||
return message.getExtension(BoBDataExtension.class);
|
||||
public static BoBDataExtension from(StanzaView stanza) {
|
||||
return stanza.getExtension(BoBDataExtension.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -494,6 +494,9 @@ public final class DataForm implements ExtensionElement {
|
|||
* @return a reference to this builder.
|
||||
*/
|
||||
public Builder addItem(Item item) {
|
||||
if (items == null) {
|
||||
items = new ArrayList<>();
|
||||
}
|
||||
items.add(item);
|
||||
return this;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue