mirror of
https://github.com/igniterealtime/Spark.git
synced 2026-03-07 08:05:40 +00:00
SPARK-2355: StanzaError call .build()
This commit is contained in:
committed by
Guus der Kinderen
parent
988083fbc6
commit
bc364b545b
@ -385,7 +385,7 @@ public class VCardManager {
|
||||
}
|
||||
catch (Exception e) {
|
||||
StanzaError.Builder errorBuilder = StanzaError.getBuilder(StanzaError.Condition.conflict);
|
||||
personalVCard.setError(errorBuilder);
|
||||
personalVCard.setError(errorBuilder.build());
|
||||
personalVCardAvatar = null;
|
||||
personalVCardHash = null;
|
||||
Log.error(e);
|
||||
@ -518,7 +518,7 @@ public class VCardManager {
|
||||
catch (XMPPException | SmackException | InterruptedException e) {
|
||||
////System.out.println(jid+" Fehler in reloadVCard ----> null");
|
||||
StanzaError.Builder errorBuilder = StanzaError.getBuilder(StanzaError.Condition.resource_constraint);
|
||||
vcard.setError(errorBuilder);
|
||||
vcard.setError(errorBuilder.build());
|
||||
vcard.setJabberId(jid.toString());
|
||||
delayedContacts.add(jid);
|
||||
return vcard;
|
||||
|
||||
@ -206,7 +206,7 @@ public class ReversiPlugin implements Plugin {
|
||||
reply.setTo(invitation.getFrom());
|
||||
reply.setStanzaId(invitation.getStanzaId());
|
||||
reply.setType(IQ.Type.error);
|
||||
reply.setError(StanzaError.getBuilder().setCondition(StanzaError.Condition.undefined_condition).setDescriptiveEnText("User declined your request."));
|
||||
reply.setError(StanzaError.getBuilder().setCondition(StanzaError.Condition.undefined_condition).setDescriptiveEnText("User declined your request.").build());
|
||||
try
|
||||
{
|
||||
SparkManager.getConnection().sendStanza(reply);
|
||||
@ -299,7 +299,7 @@ public class ReversiPlugin implements Plugin {
|
||||
GameOffer reply = new GameOffer();
|
||||
reply.setTo(((ChatRoomImpl) room).getJID());
|
||||
reply.setType(IQ.Type.error);
|
||||
reply.setError(StanzaError.getBuilder().setCondition(StanzaError.Condition.undefined_condition).setDescriptiveEnText("User cancelled the invitation."));
|
||||
reply.setError(StanzaError.getBuilder().setCondition(StanzaError.Condition.undefined_condition).setDescriptiveEnText("User cancelled the invitation.").build());
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@ -247,7 +247,7 @@ public class TicTacToePlugin implements Plugin {
|
||||
|
||||
decline.addActionListener(e -> {
|
||||
invitation.setType(IQ.Type.error);
|
||||
invitation.setError(StanzaError.getBuilder().setCondition(StanzaError.Condition.undefined_condition).setDescriptiveEnText("User declined your request."));
|
||||
invitation.setError(StanzaError.getBuilder().setCondition(StanzaError.Condition.undefined_condition).setDescriptiveEnText("User declined your request.").build());
|
||||
try {
|
||||
SparkManager.getConnection().sendStanza(invitation);
|
||||
} catch (SmackException.NotConnectedException | InterruptedException e1) {
|
||||
|
||||
Reference in New Issue
Block a user