...
 
Commits (2)
......@@ -43,7 +43,12 @@ It depends on the webhook end to verify the token and to process the context.
## Commands:
```
Webhooker help: Commands:!webhooker autoverify_unknown To set a autoverify the unkown users in a room, true|false!webhooker command:ls To get list of defined commands in a room!webhooker command:rm The command to remove in a room, to view the list run command:ls in a room!webhooker command:set To set a command in [context] a room Options: --version Show version number [boolean] --help Show help [boolean]
Webhooker help:
Commands:
!webhooker autoverify_unknown To set a autoverify the unkown users in a room, true|false
!webhooker command:ls To get list of defined commands in a room
!webhooker command:rm The command to remove in a room, to view the list run command:ls in a room
!webhooker command:set To set a command in a room
```
### command:set
......
......@@ -194,6 +194,11 @@ function setupBindings() {
// User invites the bot, Need to auto-join and add to bot accountdata as m.direct
// member.userId is the invited user, and here we want to be the bot
if (member.membership === "invite" && member.userId === client.getUserId()) {
//TODO By now only invitations from users from same server are allowed
//when safeness assertion done it must be changed
if (!event.getSender().endsWith(client.getUserId().substr(client.getUserId().lastIndexOf(":"))))
return
if (event.getSender())
client.joinRoom(member.roomId).then((room) => {
logger.debug("Auto-joined %s", room.roomId);
// Mark in Account Data as DM if it is
......