Version 1.8.0
This commit is contained in:
parent
20994e2995
commit
aa561c5be6
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
COMMIT := $(shell git rev-parse --short HEAD)
|
COMMIT := $(shell git rev-parse --short HEAD)
|
||||||
TD_COMMIT := "8517026415e75a8eec567774072cbbbbb52376c1"
|
TD_COMMIT := "8517026415e75a8eec567774072cbbbbb52376c1"
|
||||||
VERSION := "v1.8.0-dev"
|
VERSION := "v1.8.0"
|
||||||
MAKEOPTS := "-j4"
|
MAKEOPTS := "-j4"
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|
|
@ -15,7 +15,7 @@ import (
|
||||||
goxmpp "gosrc.io/xmpp"
|
goxmpp "gosrc.io/xmpp"
|
||||||
)
|
)
|
||||||
|
|
||||||
var version string = "1.8.0-dev"
|
var version string = "1.8.0"
|
||||||
var commit string
|
var commit string
|
||||||
|
|
||||||
var sm *goxmpp.StreamManager
|
var sm *goxmpp.StreamManager
|
||||||
|
|
|
@ -249,15 +249,15 @@ func (c *Client) ProcessStatusUpdate(chatID int64, status string, show string, o
|
||||||
presenceType = typ
|
presenceType = typ
|
||||||
}
|
}
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
"show": show,
|
"show": show,
|
||||||
"status": status,
|
"status": status,
|
||||||
"presenceType": presenceType,
|
"presenceType": presenceType,
|
||||||
}).Debug("Cached status")
|
}).Debug("Cached status")
|
||||||
} else if user != nil && user.Status != nil {
|
} else if user != nil && user.Status != nil {
|
||||||
show, status, presenceType = c.userStatusToText(user.Status, chatID)
|
show, status, presenceType = c.userStatusToText(user.Status, chatID)
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
"show": show,
|
"show": show,
|
||||||
"status": status,
|
"status": status,
|
||||||
"presenceType": presenceType,
|
"presenceType": presenceType,
|
||||||
}).Debug("Status to text")
|
}).Debug("Status to text")
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -624,35 +624,35 @@ func iqAnswerSetError(answer *stanza.IQ, payload *extensions.QueryRegister, code
|
||||||
switch code {
|
switch code {
|
||||||
case 400:
|
case 400:
|
||||||
answer.Error = &stanza.Err{
|
answer.Error = &stanza.Err{
|
||||||
Code: code,
|
Code: code,
|
||||||
Type: stanza.ErrorTypeModify,
|
Type: stanza.ErrorTypeModify,
|
||||||
Reason: "bad-request",
|
Reason: "bad-request",
|
||||||
}
|
}
|
||||||
case 405:
|
case 405:
|
||||||
answer.Error = &stanza.Err{
|
answer.Error = &stanza.Err{
|
||||||
Code: code,
|
Code: code,
|
||||||
Type: stanza.ErrorTypeCancel,
|
Type: stanza.ErrorTypeCancel,
|
||||||
Reason: "not-allowed",
|
Reason: "not-allowed",
|
||||||
Text: "Logging out is dangerous. If you are sure you would be able to receive the authentication code again, issue the /logout command to the transport",
|
Text: "Logging out is dangerous. If you are sure you would be able to receive the authentication code again, issue the /logout command to the transport",
|
||||||
}
|
}
|
||||||
case 406:
|
case 406:
|
||||||
answer.Error = &stanza.Err{
|
answer.Error = &stanza.Err{
|
||||||
Code: code,
|
Code: code,
|
||||||
Type: stanza.ErrorTypeModify,
|
Type: stanza.ErrorTypeModify,
|
||||||
Reason: "not-acceptable",
|
Reason: "not-acceptable",
|
||||||
Text: "Phone number already provided, chat with the transport for further instruction",
|
Text: "Phone number already provided, chat with the transport for further instruction",
|
||||||
}
|
}
|
||||||
case 500:
|
case 500:
|
||||||
answer.Error = &stanza.Err{
|
answer.Error = &stanza.Err{
|
||||||
Code: code,
|
Code: code,
|
||||||
Type: stanza.ErrorTypeWait,
|
Type: stanza.ErrorTypeWait,
|
||||||
Reason: "internal-server-error",
|
Reason: "internal-server-error",
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
log.Error("Unknown error code, falling back with empty reason")
|
log.Error("Unknown error code, falling back with empty reason")
|
||||||
answer.Error = &stanza.Err{
|
answer.Error = &stanza.Err{
|
||||||
Code: code,
|
Code: code,
|
||||||
Type: stanza.ErrorTypeCancel,
|
Type: stanza.ErrorTypeCancel,
|
||||||
Reason: "undefined-condition",
|
Reason: "undefined-condition",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue