mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-22 12:37:58 +01:00
[extensions] Use StanzaView as parameter type in BoBDataExtension.from()
BoBDataExtensions can also appear in IQs (Registration IQ), and potentially also Presence stanzas. Fixes SMACK-901.
This commit is contained in:
parent
84d73e9623
commit
9ab50c374d
1 changed files with 4 additions and 4 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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue