Skip to content

Commit

Permalink
fix #66
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Nov 20, 2017
1 parent bd72aa3 commit 3002812
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion streaming.go
Expand Up @@ -69,7 +69,7 @@ func handleReader(q chan Event, r io.Reader) error {
q <- &NotificationEvent{&notification}
}
case "delete":
q <- &DeleteEvent{ID(strings.TrimSpace(token[1]))}
q <- &DeleteEvent{ID: ID(strings.TrimSpace(token[1]))}
}
if err != nil {
q <- &ErrorEvent{err}
Expand Down
4 changes: 2 additions & 2 deletions streaming_ws.go
Expand Up @@ -3,9 +3,9 @@ package mastodon
import (
"context"
"encoding/json"
"fmt"
"net/url"
"path"
"strings"

"github.com/gorilla/websocket"
)
Expand Down Expand Up @@ -128,7 +128,7 @@ func (c *WSClient) handleWS(ctx context.Context, rawurl string, q chan Event) er
q <- &NotificationEvent{Notification: &notification}
}
case "delete":
q <- &DeleteEvent{ID: ID(fmt.Sprint(int64(s.Payload.(float64))))}
q <- &DeleteEvent{ID: ID(strings.TrimSpace(s.Payload.(string)))}
}
if err != nil {
q <- &ErrorEvent{err}
Expand Down

0 comments on commit 3002812

Please sign in to comment.