Explorar o código

Fix issue when getting anonymous sender

painor %!s(int64=4) %!d(string=hai) anos
pai
achega
3f5269ff90
Modificáronse 2 ficheiros con 2 adicións e 5 borrados
  1. 1 2
      gramjs/tl/custom/message.ts
  2. 1 3
      gramjs/tl/custom/senderGetter.ts

+ 1 - 2
gramjs/tl/custom/message.ts

@@ -216,8 +216,7 @@ export class Message extends Mixin(SenderGetter, ChatGetter) {
         }
 
         if (this.fwdFrom) {
-            // todo fix this
-            //  this._forward = new Forward(this._client, this.fwdFrom, this.entities)
+            this._forward = new Forward(this._client, this.fwdFrom, entities);
         }
 
         if (this.action) {

+ 1 - 3
gramjs/tl/custom/senderGetter.ts

@@ -49,9 +49,7 @@ export class SenderGetter {
                 await this._refetchSender();
             }
         }
-        if (!this._sender) {
-            throw new Error("Could not find sender");
-        }
+
         return this._sender;
     }