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

Commit

Permalink
update client to handle receipts
Browse files Browse the repository at this point in the history
  • Loading branch information
morph027 committed Jan 3, 2020
1 parent f9e87a2 commit 883fb59
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions cmd/textsecure/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"time"
"gopkg.in/yaml.v2"

"github.com/nanu-c/textsecure"
"github.com/nanu-c/textsecure/axolotl"
"github.com/morph027/textsecure"
"github.com/morph027/textsecure/axolotl"
"golang.org/x/crypto/ssh/terminal"
)

Expand Down Expand Up @@ -155,6 +155,9 @@ func conversationLoop(isGroup bool) {
}
}

func receiptMessageHandler(msg *textsecure.Message) {
}

func messageHandler(msg *textsecure.Message) {
if echo {
to := msg.Source()
Expand Down Expand Up @@ -441,19 +444,21 @@ func main() {
flag.Parse()
log.SetFlags(0)
client := &textsecure.Client{
GetConfig: getConfig,
GetLocalContacts: getLocalContacts,
GetVerificationCode: getVerificationCode,
GetStoragePassword: getStoragePassword,
MessageHandler: messageHandler,
RegistrationDone: registrationDone,
GetConfig: getConfig,
GetLocalContacts: getLocalContacts,
GetVerificationCode: getVerificationCode,
GetStoragePassword: getStoragePassword,
MessageHandler: messageHandler,
ReceiptMessageHandler: receiptMessageHandler,
RegistrationDone: registrationDone,
}
err := textsecure.Setup(client)
if err != nil {
log.Fatal(err)
}

if gateway {
go textsecure.StartListening()
http.HandleFunc("/", GatewayHandler)
http.HandleFunc("/groups", GroupsHandler)
http.HandleFunc("/rekey/", RekeyHandler)
Expand Down

0 comments on commit 883fb59

Please sign in to comment.