Skip to content
Snippets Groups Projects
Commit 8967d2e8 authored by Jake Taylor's avatar Jake Taylor
Browse files

fix eventModel interface

parent d2cb1308
No related branches found
No related tags found
4 merge requests!510Release,!419rewrote the health tracker to both consider if there are waiting rounds and...,!369Full round obj,!340Project/channels
...@@ -54,9 +54,10 @@ type EventModel interface { ...@@ -54,9 +54,10 @@ type EventModel interface {
// it is incumbent on the user of the API to filter such called by message ID // it is incumbent on the user of the API to filter such called by message ID
// Messages may arrive our of order, so a reply in theory can arrive before // Messages may arrive our of order, so a reply in theory can arrive before
// the initial message, as a result it may be important to buffer replies. // the initial message, as a result it may be important to buffer replies.
ReceiveReply(ChannelID *id.ID, messageID cryptoChannel.MessageID, ReceiveReply(channelID *id.ID, messageID cryptoChannel.MessageID,
SenderUsername string, text string, timestamp time.Time, reactionTo cryptoChannel.MessageID, senderUsername string,
lease time.Duration, round rounds.Round) text string, timestamp time.Time, lease time.Duration,
round rounds.Round)
// ReceiveReaction is called whenever a reaction to a message is received // ReceiveReaction is called whenever a reaction to a message is received
// on a given channel. It may be called multiple times on the same reaction, // on a given channel. It may be called multiple times on the same reaction,
......
...@@ -37,6 +37,32 @@ type MockEvent struct { ...@@ -37,6 +37,32 @@ type MockEvent struct {
eventReceive eventReceive
} }
func (m *MockEvent) MessageSent(channelID *id.ID, messageID cryptoChannel.MessageID,
myUsername string, text string, timestamp time.Time, lease time.Duration, round rounds.Round) {
//TODO implement me
panic("implement me")
}
func (m *MockEvent) ReplySent(channelID *id.ID, messageID cryptoChannel.MessageID,
replyTo cryptoChannel.MessageID, myUsername string, text string,
timestamp time.Time, lease time.Duration, round rounds.Round) {
//TODO implement me
panic("implement me")
}
func (m *MockEvent) ReactionSent(channelID *id.ID, messageID cryptoChannel.MessageID,
reactionTo cryptoChannel.MessageID, senderUsername string, reaction string,
timestamp time.Time, lease time.Duration, round rounds.Round) {
//TODO implement me
panic("implement me")
}
func (m *MockEvent) UpdateSentStatus(messageID cryptoChannel.MessageID,
status SentStatus) {
//TODO implement me
panic("implement me")
}
func (*MockEvent) JoinChannel(channel *cryptoBroadcast.Channel) {} func (*MockEvent) JoinChannel(channel *cryptoBroadcast.Channel) {}
func (*MockEvent) LeaveChannel(channelID *id.ID) {} func (*MockEvent) LeaveChannel(channelID *id.ID) {}
func (m *MockEvent) ReceiveMessage(channelID *id.ID, messageID cryptoChannel.MessageID, func (m *MockEvent) ReceiveMessage(channelID *id.ID, messageID cryptoChannel.MessageID,
......
...@@ -500,6 +500,32 @@ type mockEventModel struct { ...@@ -500,6 +500,32 @@ type mockEventModel struct {
leftCh *id.ID leftCh *id.ID
} }
func (m *mockEventModel) MessageSent(channelID *id.ID, messageID cryptoChannel.MessageID,
myUsername string, text string, timestamp time.Time, lease time.Duration, round rounds.Round) {
//TODO implement me
panic("implement me")
}
func (m *mockEventModel) ReplySent(channelID *id.ID, messageID cryptoChannel.MessageID,
replyTo cryptoChannel.MessageID, myUsername string, text string,
timestamp time.Time, lease time.Duration, round rounds.Round) {
//TODO implement me
panic("implement me")
}
func (m *mockEventModel) ReactionSent(channelID *id.ID, messageID cryptoChannel.MessageID,
reactionTo cryptoChannel.MessageID, senderUsername string, reaction string,
timestamp time.Time, lease time.Duration, round rounds.Round) {
//TODO implement me
panic("implement me")
}
func (m *mockEventModel) UpdateSentStatus(messageID cryptoChannel.MessageID,
status SentStatus) {
//TODO implement me
panic("implement me")
}
func (m *mockEventModel) JoinChannel(c *cryptoBroadcast.Channel) { func (m *mockEventModel) JoinChannel(c *cryptoBroadcast.Channel) {
m.joinedCh = c m.joinedCh = c
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment