aboutsummaryrefslogtreecommitdiff
path: root/interface
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2018-04-10 19:31:28 +0300
committerTulir Asokan <tulir@maunium.net>2018-04-10 19:31:28 +0300
commit8270bc0322ac262f4b48c92d5fad25cf9634f1bb (patch)
tree8ff85b17f4d2948b8d3bae40738d97ad25f43488 /interface
parentee67c1446cbb3c446d59d4ebd9657a25bf0b702d (diff)
Move event parsing to ui/messages and add image displaying
Diffstat (limited to 'interface')
-rw-r--r--interface/matrix.go1
-rw-r--r--interface/ui.go5
2 files changed, 4 insertions, 2 deletions
diff --git a/interface/matrix.go b/interface/matrix.go
index f811dff..b7b52c3 100644
--- a/interface/matrix.go
+++ b/interface/matrix.go
@@ -34,4 +34,5 @@ type MatrixContainer interface {
LeaveRoom(roomID string) error
GetHistory(roomID, prevBatch string, limit int) ([]gomatrix.Event, string, error)
GetRoom(roomID string) *rooms.Room
+ Download(mxcURL string) ([]byte, error)
}
diff --git a/interface/ui.go b/interface/ui.go
index 2d27ea8..df92308 100644
--- a/interface/ui.go
+++ b/interface/ui.go
@@ -51,8 +51,9 @@ type MainView interface {
SaveAllHistory()
SetTyping(roomID string, users []string)
- ProcessMessageEvent(roomView RoomView, evt *gomatrix.Event) Message
- ProcessMembershipEvent(roomView RoomView, evt *gomatrix.Event) Message
+ ParseEvent(roomView RoomView, evt *gomatrix.Event) Message
+ //ProcessMessageEvent(roomView RoomView, evt *gomatrix.Event) Message
+ //ProcessMembershipEvent(roomView RoomView, evt *gomatrix.Event) Message
NotifyMessage(room *rooms.Room, message Message, should pushrules.PushActionArrayShould)
}