aboutsummaryrefslogtreecommitdiff
path: root/interface
diff options
context:
space:
mode:
Diffstat (limited to 'interface')
-rw-r--r--interface/matrix.go4
-rw-r--r--interface/ui.go15
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)
}