Skip to content

Commit 832a851

Browse files
[CHA-242] Adding new property to channel config (#291)
* feat: adding new property to channel config * fix: test
1 parent 496be53 commit 832a851

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

channel_config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ type ChannelConfig struct {
4343
// Dynamic Partitioning
4444
PartitionSize int `json:"partition_size,omitempty"`
4545
PartitionTTL *DurationString `json:"partition_ttl,omitempty"`
46+
47+
SkipLastMsgUpdateForSystemMsgs bool `json:"skip_last_msg_update_for_system_msgs,omitempty"`
4648
}
4749

4850
// DurationString is a duration that's encoded to as a string in JSON.

message_history_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func TestMessageHistory(t *testing.T) {
2020
initialText := "initial text"
2121
customField := "custom_field"
2222
initialCustomFieldValue := "custom value"
23-
// send a message with initial text
23+
// send a message with initial text (user1)
2424
response, err := ch.SendMessage(ctx, &Message{Text: initialText, ExtraData: map[string]interface{}{customField: initialCustomFieldValue}}, user1.ID)
2525
require.NoError(t, err)
2626
message := response.Message
@@ -56,7 +56,7 @@ func TestMessageHistory(t *testing.T) {
5656

5757
secondUpdate := history[0]
5858
assert.Equal(t, updatedText1, secondUpdate.Text)
59-
assert.Equal(t, user2.ID, secondUpdate.MessageUpdatedByID)
59+
assert.Equal(t, user1.ID, secondUpdate.MessageUpdatedByID)
6060
assert.Equal(t, updatedCustomFieldValue, secondUpdate.ExtraData[customField].(string))
6161
})
6262

@@ -85,6 +85,6 @@ func TestMessageHistory(t *testing.T) {
8585

8686
secondUpdate := sortedHistory[1]
8787
assert.Equal(t, updatedText1, secondUpdate.Text)
88-
assert.Equal(t, user2.ID, secondUpdate.MessageUpdatedByID)
88+
assert.Equal(t, user1.ID, secondUpdate.MessageUpdatedByID)
8989
})
9090
}

0 commit comments

Comments
 (0)