diff --git a/channels/eventModel.go b/channels/eventModel.go index df9f8708f06718b6cfcb1b628fc83a14480aadac..403287adb7ab71fd3164d4bbbe5eb6931f357de4 100644 --- a/channels/eventModel.go +++ b/channels/eventModel.go @@ -54,9 +54,10 @@ type EventModel interface { // 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 // the initial message, as a result it may be important to buffer replies. - ReceiveReply(ChannelID *id.ID, messageID cryptoChannel.MessageID, - SenderUsername string, text string, timestamp time.Time, - lease time.Duration, round rounds.Round) + ReceiveReply(channelID *id.ID, messageID cryptoChannel.MessageID, + reactionTo cryptoChannel.MessageID, senderUsername string, + text string, timestamp time.Time, lease time.Duration, + round rounds.Round) // 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, diff --git a/channels/eventModel_test.go b/channels/eventModel_test.go index 866e2b7614273436936e17654b561b1b06df7ea4..a144be353192276de837fac237de9a5e0ba3a5d2 100644 --- a/channels/eventModel_test.go +++ b/channels/eventModel_test.go @@ -37,6 +37,32 @@ type MockEvent struct { 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) LeaveChannel(channelID *id.ID) {} func (m *MockEvent) ReceiveMessage(channelID *id.ID, messageID cryptoChannel.MessageID, diff --git a/channels/joinedChannel_test.go b/channels/joinedChannel_test.go index cebec207d35738d0c8f7ab3d04b267604130a87f..e3bcbb011d1a69d173a4260961d8a771608e7e18 100644 --- a/channels/joinedChannel_test.go +++ b/channels/joinedChannel_test.go @@ -500,6 +500,32 @@ type mockEventModel struct { 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) { m.joinedCh = c }