mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Move MakeJoin logic to GMSL (#3081)
This commit is contained in:
parent
0489d16f95
commit
67d6876857
80 changed files with 1158 additions and 494 deletions
|
@ -31,7 +31,17 @@ import (
|
|||
|
||||
// ErrRoomNoExists is returned when trying to lookup the state of a room that
|
||||
// doesn't exist
|
||||
var ErrRoomNoExists = errors.New("room does not exist")
|
||||
var errRoomNoExists = fmt.Errorf("room does not exist")
|
||||
|
||||
type ErrRoomNoExists struct{}
|
||||
|
||||
func (e ErrRoomNoExists) Error() string {
|
||||
return errRoomNoExists.Error()
|
||||
}
|
||||
|
||||
func (e ErrRoomNoExists) Unwrap() error {
|
||||
return errRoomNoExists
|
||||
}
|
||||
|
||||
// QueryAndBuildEvent builds a Matrix event using the event builder and roomserver query
|
||||
// API client provided. If also fills roomserver query API response (if provided)
|
||||
|
@ -116,7 +126,7 @@ func addPrevEventsToEvent(
|
|||
queryRes *api.QueryLatestEventsAndStateResponse,
|
||||
) error {
|
||||
if !queryRes.RoomExists {
|
||||
return ErrRoomNoExists
|
||||
return ErrRoomNoExists{}
|
||||
}
|
||||
|
||||
verImpl, err := gomatrixserverlib.GetRoomVersion(queryRes.RoomVersion)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue