Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
fix textsecure cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Dec 27, 2021
1 parent 6477416 commit 04e83ca
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
22 changes: 21 additions & 1 deletion cmd/textsecure/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ func getCaptchaToken() string {

return readLine("4. Enter captcha token>")
}

func getPhoneNumber() string {
return readLine("Enter Phone number beginning with + and country code like +44...>")
}
func getPin() string {
return readLine("Enter Pin>")
}
func getVerificationCode() string {
return readLine("Enter verification code>")
}
Expand Down Expand Up @@ -201,6 +206,14 @@ func conversationLoop(isGroup bool) {

func receiptMessageHandler(msg *textsecure.Message) {
}
func typingMessageHandler(msg *textsecure.Message) {
}
func callMessageHandler(msg *textsecure.Message) {
}
func syncSentHandler(msg *textsecure.Message, id uint64) {
}
func syncReadHandler(text string, id uint64) {
}

func messageHandler(msg *textsecure.Message) {
if echo {
Expand Down Expand Up @@ -503,7 +516,14 @@ func main() {
ReceiptMessageHandler: receiptMessageHandler,
RegistrationDone: registrationDone,
GetUsername: getUsername,
GetPhoneNumber: getPhoneNumber,
GetPin: getPin,
TypingMessageHandler: typingMessageHandler,
CallMessageHandler: callMessageHandler,
SyncReadHandler: syncReadHandler,
SyncSentHandler: syncSentHandler,
}

err := textsecure.Setup(client)
if err != nil {
log.Fatal(err)
Expand Down
4 changes: 3 additions & 1 deletion crayfish/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ func Run() {
} else if _, err := os.Stat("./crayfish/target/debug/crayfish"); err == nil {
Instance.cmd = exec.Command("./crayfish/target/debug/crayfish")
} else {
log.Errorln("[textsecure-crayfish] crayfish not found")
log.Errorln("[textsecure-crayfish] crayfish not found textsecure doesn't work without crayfish")
log.Errorln("[textsecure-crayfish] Please install crayfish, hints are in the README at https://github.com/signal-golang/textsecure")
Instance.cmd = exec.Command("pwd")
os.Exit(1)
}
} else {
Instance.cmd = exec.Command(path)
Expand Down

0 comments on commit 04e83ca

Please sign in to comment.