Add basic mailboxes command

This can be improved in the future, to show some additional information
about each mailbox like:

- "how many users are in that room"
- "which users are in that room"
- "who is the owner of the mailbox"

This can all be done later though.
This commit is contained in:
Slavi Pantaleev
2022-08-29 10:28:19 +03:00
parent a057654962
commit 79775c0c13
3 changed files with 51 additions and 0 deletions

View File

@@ -35,3 +35,7 @@ func (b *Bot) allowOwner(actorID id.UserID, targetRoomID id.RoomID) (bool, error
return owner == actorID.String(), nil
}
func (b *Bot) allowAdmin(actorID id.UserID, targetRoomID id.RoomID) (bool, error) {
return utils.Match(actorID.String(), b.allowedAdmins), nil
}