mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-21 22:02:06 +01:00
Use IQ.isRequestIQ() in IQ
This commit is contained in:
parent
d1f2631771
commit
3075430713
1 changed files with 1 additions and 1 deletions
|
@ -297,7 +297,7 @@ public abstract class IQ extends Stanza {
|
|||
* @return a new {@link Type#error IQ.Type.error} IQ based on the originating IQ.
|
||||
*/
|
||||
public static ErrorIQ createErrorResponse(final IQ request, final StanzaError.Builder error) {
|
||||
if (!(request.getType() == Type.get || request.getType() == Type.set)) {
|
||||
if (!request.isRequestIQ()) {
|
||||
throw new IllegalArgumentException(
|
||||
"IQ must be of type 'set' or 'get'. Original IQ: " + request.toXML());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue