fix-66
Yasuhiro Matsumoto 2017-11-20 09:58:20 +09:00
parent bd72aa305d
commit 3002812c02
2 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ func handleReader(q chan Event, r io.Reader) error {
q <- &NotificationEvent{&notification} q <- &NotificationEvent{&notification}
} }
case "delete": case "delete":
q <- &DeleteEvent{ID(strings.TrimSpace(token[1]))} q <- &DeleteEvent{ID: ID(strings.TrimSpace(token[1]))}
} }
if err != nil { if err != nil {
q <- &ErrorEvent{err} q <- &ErrorEvent{err}

View File

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