fix: sync non-PTS privacy updates
This commit is contained in:
parent
6cafa40c7b
commit
cc76cd3679
17 changed files with 196 additions and 421 deletions
|
|
@ -105,20 +105,9 @@ func cloneUpdateEvent(event domain.UpdateEvent) domain.UpdateEvent {
|
|||
event.Reaction = cloneUpdateReaction(event.Reaction)
|
||||
event.QuickReplies = cloneUpdateQuickReplies(event.QuickReplies)
|
||||
event.QuickReplyMessage = cloneUpdateQuickReplyMessage(event.QuickReplyMessage)
|
||||
event.Privacy.Rules = clonePrivacyRuleSlice(event.Privacy.Rules)
|
||||
return event
|
||||
}
|
||||
|
||||
func clonePrivacyRuleSlice(in []domain.PrivacyRule) []domain.PrivacyRule {
|
||||
out := make([]domain.PrivacyRule, len(in))
|
||||
for i := range in {
|
||||
out[i] = in[i]
|
||||
out[i].UserIDs = append([]int64(nil), in[i].UserIDs...)
|
||||
out[i].ChatIDs = append([]int64(nil), in[i].ChatIDs...)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func cloneUpdateStory(story domain.Story) domain.Story {
|
||||
story.Entities = append([]domain.MessageEntity(nil), story.Entities...)
|
||||
story.Views.Reactions = append([]domain.ChannelMessageReactionCount(nil), story.Views.Reactions...)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue