From 9ab50c374deff4aac968769efedf23676907bacc Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 25 Jan 2021 14:29:21 +0100 Subject: [PATCH] [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. --- .../jivesoftware/smackx/bob/element/BoBDataExtension.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/element/BoBDataExtension.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/element/BoBDataExtension.java index 7b7f81709..1bea87b82 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/element/BoBDataExtension.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bob/element/BoBDataExtension.java @@ -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); } }