Browse Source

Prevent misusing --create-portals in sync command

Tulir Asokan 2 years ago
parent
commit
ee26bc6061
1 changed files with 4 additions and 0 deletions
  1. 4 0
      commands.go

+ 4 - 0
commands.go

@@ -1110,6 +1110,10 @@ func fnSync(ce *WrappedCommandEvent) {
 		ce.Reply("`--contact-avatars` can only be used with `sync contacts`")
 		return
 	}
+	if createPortals && !groups {
+		ce.Reply("`--create-portals` can only be used with `sync groups`")
+		return
+	}
 
 	if appState {
 		for _, name := range appstate.AllPatchNames {