mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-26 15:08:28 +00:00
WIP
Signed-off-by: Andrew Morgan <andrewm@matrix.org>
This commit is contained in:
parent
678a34c546
commit
e74bc52239
1 changed files with 15 additions and 0 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue