fix chats renamed to channels
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
0cdcce3102
commit
e4fac6e106
|
@ -51,9 +51,11 @@ func main() {
|
|||
|
||||
// setup work
|
||||
workConfig := WorkUnitConfig{
|
||||
From: uint32(time.Now().Add(-*duration).Unix()),
|
||||
To: uint32(time.Now().Add(-5 * time.Minute).Unix()), // subtract 5 mins to cater for TTL, time skew on devices etc.
|
||||
Chats: *chats,
|
||||
Channels: *channels,
|
||||
// starting time for the envelope query
|
||||
From: uint32(time.Now().Add(-*duration).Unix()),
|
||||
// subtract 5 mins to cater for TTL, time skew on devices etc.
|
||||
To: uint32(time.Now().Add(-5 * time.Minute).Unix()),
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
|
@ -43,9 +43,9 @@ func NewWorkUnit(mailEnode string, config *params.NodeConfig) *WorkUnit {
|
|||
|
||||
// WorkUnitConfig configures the execution of the work.
|
||||
type WorkUnitConfig struct {
|
||||
From uint32
|
||||
To uint32
|
||||
Chats []string
|
||||
From uint32
|
||||
To uint32
|
||||
Channels []string
|
||||
}
|
||||
|
||||
// Execute runs the work.
|
||||
|
@ -62,7 +62,7 @@ func (u *WorkUnit) Execute(config WorkUnitConfig) error {
|
|||
return fmt.Errorf("failed to add peer: %v", err)
|
||||
}
|
||||
|
||||
for _, chatName := range config.Chats {
|
||||
for _, chatName := range config.Channels {
|
||||
chat := protocol.CreatePublicChat(chatName, u.messenger.Timesource())
|
||||
if err := u.messenger.Join(chat); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue