mirror of
https://github.com/igniterealtime/Spark.git
synced 2026-02-05 01:45:51 +00:00
SPARK-2355: StanzaError call .build()
This commit is contained in:
committed by
Guus der Kinderen
parent
988083fbc6
commit
bc364b545b
@ -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