Browse Source

remove payment-required stanza error condition and add policy-violation condition instead

master
Philipp Balzarek 12 years ago
parent
commit
d67869305a
  1. 4
      source/Network/Xmpp/Marshal.hs
  2. 6
      source/Network/Xmpp/Types.hs

4
source/Network/Xmpp/Marshal.hs

@ -393,7 +393,7 @@ xpStanzaErrorCondition = ("xpStanzaErrorCondition", "") <?> @@ -393,7 +393,7 @@ xpStanzaErrorCondition = ("xpStanzaErrorCondition", "") <?>
stanzaErrorConditionToText NotAcceptable = "not-acceptable"
stanzaErrorConditionToText NotAllowed = "not-allowed"
stanzaErrorConditionToText NotAuthorized = "not-authorized"
stanzaErrorConditionToText PaymentRequired = "payment-required"
stanzaErrorConditionToText PolicyViolation = "policy-violation"
stanzaErrorConditionToText RecipientUnavailable = "recipient-unavailable"
stanzaErrorConditionToText (Redirect _) = "redirect"
stanzaErrorConditionToText RegistrationRequired = "registration-required"
@ -415,7 +415,7 @@ xpStanzaErrorCondition = ("xpStanzaErrorCondition", "") <?> @@ -415,7 +415,7 @@ xpStanzaErrorCondition = ("xpStanzaErrorCondition", "") <?>
stanzaErrorConditionFromText "not-acceptable" = Just NotAcceptable
stanzaErrorConditionFromText "not-allowed" = Just NotAllowed
stanzaErrorConditionFromText "not-authorized" = Just NotAuthorized
stanzaErrorConditionFromText "payment-required" = Just PaymentRequired
stanzaErrorConditionFromText "policy-violation" = Just PolicyViolation
stanzaErrorConditionFromText "recipient-unavailable" = Just RecipientUnavailable
stanzaErrorConditionFromText "redirect" = Just $ Redirect Nothing
stanzaErrorConditionFromText "registration-required" = Just RegistrationRequired

6
source/Network/Xmpp/Types.hs

@ -301,7 +301,11 @@ data StanzaErrorCondition = BadRequest -- ^ Malformed XML. @@ -301,7 +301,11 @@ data StanzaErrorCondition = BadRequest -- ^ Malformed XML.
-- this action.
| NotAuthorized -- ^ Must provide proper
-- credentials.
| PaymentRequired
| PolicyViolation -- ^ The entity has violated
-- some local service policy
-- (e.g., a message contains
-- words that are prohibited
-- by the service)
| RecipientUnavailable -- ^ Temporarily unavailable.
| Redirect (Maybe Text) -- ^ Redirecting to other
-- entity, usually

Loading…
Cancel
Save