diff options
author | Tulir Asokan <tulir@maunium.net> | 2019-04-10 01:04:39 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2019-04-10 01:04:39 +0300 |
commit | bbde1219479bb257c7bc1f9546bd67e8a151198c (patch) | |
tree | 01ae23d19ed4ff44fa218633ae94511778c17ffa /interface | |
parent | dbee49476d47bb391dc6af0b774f9fd101b0c917 (diff) |
It compiles. Ship it!
Diffstat (limited to 'interface')
-rw-r--r-- | interface/matrix.go | 4 | ||||
-rw-r--r-- | interface/ui.go | 15 |
2 files changed, 7 insertions, 12 deletions
diff --git a/interface/matrix.go b/interface/matrix.go index bfce8b5..8c80c6d 100644 --- a/interface/matrix.go +++ b/interface/matrix.go @@ -34,8 +34,8 @@ type MatrixContainer interface { Logout() SendPreferencesToMatrix() - SendMessage(roomID string, msgtype mautrix.MessageType, message string) (string, error) - SendMarkdownMessage(roomID string, msgtype mautrix.MessageType, message string) (string, error) + PrepareMarkdownMessage(roomID string, msgtype mautrix.MessageType, message string) *mautrix.Event + SendEvent(event *mautrix.Event) (string, error) SendTyping(roomID string, typing bool) MarkRead(roomID, eventID string) JoinRoom(roomID, server string) (*rooms.Room, error) diff --git a/interface/ui.go b/interface/ui.go index c64c748..12aabbe 100644 --- a/interface/ui.go +++ b/interface/ui.go @@ -53,14 +53,6 @@ type MainView interface { InitialSyncDone() } -type MessageDirection int - -const ( - AppendMessage MessageDirection = iota - PrependMessage - IgnoreMessage -) - type RoomView interface { MxRoom() *rooms.Room @@ -69,8 +61,7 @@ type RoomView interface { UpdateUserList() ParseEvent(evt *mautrix.Event) Message - AppendMessage(message Message) - MarkMessageFailed(message Message) + AddMessage(message Message) AddServiceMessage(message string) } @@ -81,4 +72,8 @@ type Message interface { Timestamp() time.Time NotificationSenderName() string NotificationContent() string + + SetState(state mautrix.OutgoingEventState) + SetIsHighlight(highlight bool) + SetID(id string) } |