mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-02-07 11:34:28 -06:00
Merge branch 'master' into neilalexander/fscache
This commit is contained in:
commit
88264974ee
|
@ -94,6 +94,12 @@ func (s *OutputRoomEventConsumer) onMessage(msg *sarama.ConsumerMessage) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := s.processMessage(*output.NewRoomEvent); err != nil {
|
if err := s.processMessage(*output.NewRoomEvent); err != nil {
|
||||||
|
switch err.(type) {
|
||||||
|
case *queue.ErrorFederationDisabled:
|
||||||
|
log.WithField("error", output.Type).Info(
|
||||||
|
err.Error(),
|
||||||
|
)
|
||||||
|
default:
|
||||||
// panic rather than continue with an inconsistent database
|
// panic rather than continue with an inconsistent database
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
"event": string(ev.JSON()),
|
"event": string(ev.JSON()),
|
||||||
|
@ -101,6 +107,7 @@ func (s *OutputRoomEventConsumer) onMessage(msg *sarama.ConsumerMessage) error {
|
||||||
"del": output.NewRoomEvent.RemovesStateEventIDs,
|
"del": output.NewRoomEvent.RemovesStateEventIDs,
|
||||||
log.ErrorKey: err,
|
log.ErrorKey: err,
|
||||||
}).Panicf("roomserver output log: write room event failure")
|
}).Panicf("roomserver output log: write room event failure")
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -122,13 +122,23 @@ func (oqs *OutgoingQueues) getQueue(destination gomatrixserverlib.ServerName) *d
|
||||||
return oq
|
return oq
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ErrorFederationDisabled struct {
|
||||||
|
Message string
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *ErrorFederationDisabled) Error() string {
|
||||||
|
return e.Message
|
||||||
|
}
|
||||||
|
|
||||||
// SendEvent sends an event to the destinations
|
// SendEvent sends an event to the destinations
|
||||||
func (oqs *OutgoingQueues) SendEvent(
|
func (oqs *OutgoingQueues) SendEvent(
|
||||||
ev *gomatrixserverlib.HeaderedEvent, origin gomatrixserverlib.ServerName,
|
ev *gomatrixserverlib.HeaderedEvent, origin gomatrixserverlib.ServerName,
|
||||||
destinations []gomatrixserverlib.ServerName,
|
destinations []gomatrixserverlib.ServerName,
|
||||||
) error {
|
) error {
|
||||||
if oqs.disabled {
|
if oqs.disabled {
|
||||||
return fmt.Errorf("federation is disabled")
|
return &ErrorFederationDisabled{
|
||||||
|
Message: "Federation disabled",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if origin != oqs.origin {
|
if origin != oqs.origin {
|
||||||
// TODO: Support virtual hosting; gh issue #577.
|
// TODO: Support virtual hosting; gh issue #577.
|
||||||
|
@ -190,7 +200,9 @@ func (oqs *OutgoingQueues) SendEDU(
|
||||||
destinations []gomatrixserverlib.ServerName,
|
destinations []gomatrixserverlib.ServerName,
|
||||||
) error {
|
) error {
|
||||||
if oqs.disabled {
|
if oqs.disabled {
|
||||||
return fmt.Errorf("federation is disabled")
|
return &ErrorFederationDisabled{
|
||||||
|
Message: "Federation disabled",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if origin != oqs.origin {
|
if origin != oqs.origin {
|
||||||
// TODO: Support virtual hosting; gh issue #577.
|
// TODO: Support virtual hosting; gh issue #577.
|
||||||
|
|
|
@ -64,3 +64,6 @@ A prev_batch token from incremental sync can be used in the v1 messages API
|
||||||
|
|
||||||
# Blacklisted due to flakiness
|
# Blacklisted due to flakiness
|
||||||
Forgotten room messages cannot be paginated
|
Forgotten room messages cannot be paginated
|
||||||
|
|
||||||
|
# Blacklisted due to flakiness
|
||||||
|
Can re-join room if re-invited
|
|
@ -501,6 +501,5 @@ Can get rooms/{roomId}/state for a departed room (SPEC-216)
|
||||||
Users cannot set notifications powerlevel higher than their own
|
Users cannot set notifications powerlevel higher than their own
|
||||||
Forgetting room does not show up in v2 /sync
|
Forgetting room does not show up in v2 /sync
|
||||||
Can forget room you've been kicked from
|
Can forget room you've been kicked from
|
||||||
Can re-join room if re-invited
|
|
||||||
/whois
|
/whois
|
||||||
/joined_members return joined members
|
/joined_members return joined members
|
||||||
|
|
Loading…
Reference in a new issue