feat: sync durable moderation and appeals
This commit is contained in:
parent
e1a95c7318
commit
9f467f4be7
140 changed files with 13730 additions and 316 deletions
|
|
@ -105,9 +105,20 @@ 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