|
|
@ -292,17 +292,6 @@ func (db *commonMsgDatabase) BatchInsertChat2DB(ctx context.Context, conversatio
|
|
|
|
return db.BatchInsertBlock(ctx, conversationID, msgs, updateKeyMsg, msgList[0].Seq)
|
|
|
|
return db.BatchInsertBlock(ctx, conversationID, msgs, updateKeyMsg, msgList[0].Seq)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (db *commonMsgDatabase) MarkUserDeleteMsg(ctx context.Context, conversationID string, seq int64, userIDs []string) error {
|
|
|
|
|
|
|
|
if len(userIDs) == 0 {
|
|
|
|
|
|
|
|
return nil
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
msgs := make([]any, len(userIDs))
|
|
|
|
|
|
|
|
for i, userID := range userIDs {
|
|
|
|
|
|
|
|
msgs[i] = userID
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return db.BatchInsertBlock(ctx, conversationID, msgs, updateKeyDel, seq)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (db *commonMsgDatabase) RevokeMsg(ctx context.Context, conversationID string, seq int64, revoke *unRelationTb.RevokeModel) error {
|
|
|
|
func (db *commonMsgDatabase) RevokeMsg(ctx context.Context, conversationID string, seq int64, revoke *unRelationTb.RevokeModel) error {
|
|
|
|
return db.BatchInsertBlock(ctx, conversationID, []any{revoke}, updateKeyRevoke, seq)
|
|
|
|
return db.BatchInsertBlock(ctx, conversationID, []any{revoke}, updateKeyRevoke, seq)
|
|
|
|
}
|
|
|
|
}
|
|
|
|