diff options
author | Tulir Asokan <tulir@maunium.net> | 2020-04-16 19:27:35 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2020-04-19 15:01:16 +0300 |
commit | 815190be147e575f12211c468f8121e5c60e6337 (patch) | |
tree | 8abd9b3d3952dbf767ca369ddad400db8a6f2d45 /interface/ui.go | |
parent | ff20c2c44f86b40f9214f1dc3d339584e48374f1 (diff) |
Update stuff and move pushrules to mautrix-go
Diffstat (limited to 'interface/ui.go')
-rw-r--r-- | interface/ui.go | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/interface/ui.go b/interface/ui.go index abc108f..67cc35c 100644 --- a/interface/ui.go +++ b/interface/ui.go @@ -19,9 +19,10 @@ package ifc import ( "time" - "maunium.net/go/gomuks/matrix/event" - "maunium.net/go/gomuks/matrix/pushrules" + "maunium.net/go/gomuks/matrix/muksevt" "maunium.net/go/gomuks/matrix/rooms" + "maunium.net/go/mautrix/id" + "maunium.net/go/mautrix/pushrules" ) type UIProvider func(gmx Gomuks) GomuksUI @@ -40,7 +41,7 @@ type GomuksUI interface { } type MainView interface { - GetRoom(roomID string) RoomView + GetRoom(roomID id.RoomID) RoomView AddRoom(room *rooms.Room) RemoveRoom(room *rooms.Room) SetRooms(rooms *rooms.RoomCache) @@ -48,7 +49,7 @@ type MainView interface { UpdateTags(room *rooms.Room) - SetTyping(roomID string, users []string) + SetTyping(roomID id.RoomID, users []id.UserID) NotifyMessage(room *rooms.Room, message Message, should pushrules.PushActionArrayShould) } @@ -57,23 +58,23 @@ type RoomView interface { MxRoom() *rooms.Room SetCompletions(completions []string) - SetTyping(users []string) + SetTyping(users []id.UserID) UpdateUserList() - AddEvent(evt *event.Event) Message - AddRedaction(evt *event.Event) - AddEdit(evt *event.Event) - AddReaction(evt *event.Event, key string) - GetEvent(eventID string) Message + AddEvent(evt *muksevt.Event) Message + AddRedaction(evt *muksevt.Event) + AddEdit(evt *muksevt.Event) + AddReaction(evt *muksevt.Event, key string) + GetEvent(eventID id.EventID) Message AddServiceMessage(message string) } type Message interface { - ID() string + ID() id.EventID Time() time.Time NotificationSenderName() string NotificationContent() string SetIsHighlight(highlight bool) - SetID(id string) + SetID(id id.EventID) } |