Преглед на файлове

Prevent misusing --create-portals in sync command

Tulir Asokan преди 2 години
родител
ревизия
ee26bc6061
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  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 {