Skip to content

Commit

Permalink
Syncup with server 0.27 protocol change.
Browse files Browse the repository at this point in the history
Websocket messages are no longer base64 encoded.
  • Loading branch information
Jani Monoses committed Jan 4, 2015
1 parent 3916621 commit cb20c55
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
package textsecure

import (
"encoding/base64"
"log"
"net/url"
"strings"
"time"

"github.com/golang/protobuf/proto"
"github.com/janimo/textsecure/protobuf"
"golang.org/x/net/websocket"
Expand Down Expand Up @@ -146,12 +146,7 @@ func ListenForMessages() {
log.Println("WebSocketMessage unmarshal", err)
continue
}
m, err := base64.StdEncoding.DecodeString(string(wsm.GetRequest().GetBody()))
if err != nil {
log.Println("WebSocketMessageRequest decode", err)
continue
}
//m := wsm.GetRequest().GetBody()
m := wsm.GetRequest().GetBody()
err = handleReceivedMessage(m)
if err != nil {
log.Println(err)
Expand Down

0 comments on commit cb20c55

Please sign in to comment.