Skip to content

added updategroup flag for func UpdateGroup() #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cmd/textsecure/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ var (
message string
attachment string
newgroup string
updategroup string
leavegroup string
endsession bool
showdevices bool
Expand All @@ -44,6 +45,7 @@ func init() {
flag.StringVar(&message, "message", "", "Single message to send, then exit")
flag.StringVar(&attachment, "attachment", "", "File to attach")
flag.StringVar(&newgroup, "newgroup", "", "Create a group, the argument has the format 'name:member1:member2'")
flag.StringVar(&updategroup, "updategroup", "", "Update a group, the argument has the format 'hexid:name:member1:member2'")
flag.StringVar(&leavegroup, "leavegroup", "", "Leave a group named by the argument")
flag.BoolVar(&endsession, "endsession", false, "Terminate session with peer")
flag.BoolVar(&showdevices, "showdevices", false, "Show linked devices")
Expand Down Expand Up @@ -289,6 +291,11 @@ func main() {
textsecure.NewGroup(s[0], s[1:])
return
}
if updategroup != "" {
s := strings.Split(updategroup, ":")
textsecure.UpdateGroup(s[0], s[1], s[2:])
return
}
if leavegroup != "" {
textsecure.LeaveGroup(leavegroup)
return
Expand Down