Skip to content

Commit

Permalink
Release v1.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
oykmnk authored Sep 21, 2019
2 parents 1770a93 + 6af919e commit 9946feb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type Handler struct {
type TextMessage struct {
Topic string
Body string
From peer.ID
From string
}

func NewHandler(pb *pubsub.PubSub, serviceTopic string, peerID peer.ID, networkTopics *mapset.Set) Handler {
Expand All @@ -55,10 +55,15 @@ func (h *Handler) HandleIncomingMessage(topic string, msg pubsub.Message, handle
switch message.Flag {
// Getting regular message
case api.FlagGenericMessage:
from := addr.String()
if h.matrixID != "" {
from = h.matrixID
}

textMessage := TextMessage{
Topic: topic,
Body: message.Body,
From: addr,
From: from,
}
handleTextMessage(textMessage)
// Getting topic request, answer topic response
Expand Down

0 comments on commit 9946feb

Please sign in to comment.