mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Linting
This commit is contained in:
parent
53a745f333
commit
837c295c26
1 changed files with 4 additions and 4 deletions
|
@ -49,11 +49,11 @@ func (r *Inputer) processRoomEvent(
|
||||||
// if we have already got this event then do not process it again, if the input kind is an outlier.
|
// if we have already got this event then do not process it again, if the input kind is an outlier.
|
||||||
// Outliers contain no extra information which may warrant a re-processing.
|
// Outliers contain no extra information which may warrant a re-processing.
|
||||||
if input.Kind == api.KindOutlier {
|
if input.Kind == api.KindOutlier {
|
||||||
evs, err := r.DB.EventsFromIDs(ctx, []string{event.EventID()})
|
evs, err2 := r.DB.EventsFromIDs(ctx, []string{event.EventID()})
|
||||||
if err == nil && len(evs) == 1 {
|
if err2 == nil && len(evs) == 1 {
|
||||||
// check hash matches if we're on early room versions where the event ID was a random string
|
// check hash matches if we're on early room versions where the event ID was a random string
|
||||||
idFormat, err := headered.RoomVersion.EventIDFormat()
|
idFormat, err2 := headered.RoomVersion.EventIDFormat()
|
||||||
if err == nil {
|
if err2 == nil {
|
||||||
switch idFormat {
|
switch idFormat {
|
||||||
case gomatrixserverlib.EventIDFormatV1:
|
case gomatrixserverlib.EventIDFormatV1:
|
||||||
if bytes.Equal(event.EventReference().EventSHA256, evs[0].EventReference().EventSHA256) {
|
if bytes.Equal(event.EventReference().EventSHA256, evs[0].EventReference().EventSHA256) {
|
||||||
|
|
Loading…
Reference in a new issue