Signed-off-by: Andrew Morgan <andrewm@matrix.org>
This commit is contained in:
Andrew Morgan 2018-06-14 14:46:21 +01:00
parent 678a34c546
commit e74bc52239

View file

@ -21,6 +21,7 @@ import (
"regexp"
"strings"
roomserverAPI "github.com/matrix-org/dendrite/roomserver/api"
yaml "gopkg.in/yaml.v2"
)
@ -69,6 +70,20 @@ func (a *ApplicationService) IsInterestedInRoomID(
return false
}
// IsInterestedInRoom checks to see if an application service is interested in a
// room by seeing if any of the virtual users owned by the appservice is in the
// room.
func (a *ApplicationService) IsInterestedInRoom(
roomID string, rsAPI *roomserverAPI,
) bool {
queryReq := rsAPI.QueryMembershipsForRoomRequest{
JoinedOnly: true,
RoomID: roomID,
Sender:
}
rsAPI.Query
}
// IsInterestedInUserID returns a bool on whether an application service's
// namespace includes the given user ID
func (a *ApplicationService) IsInterestedInUserID(