fix: sync sticker material reuse handling
This commit is contained in:
parent
bb07eb16d1
commit
20b388eeaa
5 changed files with 370 additions and 44 deletions
|
|
@ -19,8 +19,9 @@ func (s *Service) AddStickerToSet(ctx context.Context, actorUserID int64, ref do
|
|||
if err != nil {
|
||||
return domain.StickerSet{}, nil, err
|
||||
}
|
||||
if ownedSetID, _, ok := doc.StickerSetRef(); ok && ownedSetID != set.ID {
|
||||
return domain.StickerSet{}, nil, domain.ErrStickerSetFileInvalid
|
||||
doc, err = s.materialDocumentForStickerSet(ctx, doc, set.ID)
|
||||
if err != nil {
|
||||
return domain.StickerSet{}, nil, err
|
||||
}
|
||||
if containsInt64(set.DocumentIDs, doc.ID) {
|
||||
return set, docs, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue