From 145ade441415ccd43846b8ebcc3d901c5ca47858 Mon Sep 17 00:00:00 2001 From: Wizou <11647984+wiz0u@users.noreply.github.com> Date: Wed, 12 Jan 2022 14:25:32 +0100 Subject: [PATCH] fix issue #21 Exception "An item with the same key has already been added" in Messages_GetHistory --- src/TL.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TL.cs b/src/TL.cs index ccc711c..97a670f 100644 --- a/src/TL.cs +++ b/src/TL.cs @@ -223,7 +223,7 @@ namespace TL for (int i = 0; i < count; i++) { var value = (T)reader.ReadTLValue(elementType); - dict.Add(getID(value), value is UserEmpty ? null : value); + dict[getID(value)] = value is UserEmpty ? null : value; } return dict; }