xooniverse / televerse

Your gateway to seamless Telegram Bot Development 💙
https://televerse.xooniverse.com
BSD 3-Clause "New" or "Revised" License
64 stars 11 forks source link

MessageOrigin.fromJson not implemented #195

Closed doiraduc closed 10 months ago

doiraduc commented 10 months ago

Recently upgraded from version 1.11.x to 1.12.x and started getting this error.

┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────    
│ UnimplementedError: MessageOrigin.fromJson not implemented                                              
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄                                       
│ #0   new MessageOrigin.fromJson (package:televerse/src/telegram/models/abstracts/message_origin.dart:24)
│ #1   new Message.fromJson (package:televerse/src/telegram/models/message.dart:462)                     
│ #2   Update.fromJson (package:televerse/src/telegram/models/update.dart:92)                            
│ #3   RawAPI.getUpdates.<anonymous closure> (package:televerse/src/televerse/raw_api.dart:129)
│ #4   MappedIterable.elementAt (dart:_internal/iterable.dart:385)
│ #5   ListIterator.moveNext (dart:_internal/iterable.dart:354)
│ #6   new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189)
│ #7   new _GrowableList.of (dart:core-patch/growable_array.dart:150)
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

Relevant code is here. https://github.com/HeySreelal/televerse/blob/c0fe9c55f1af4b465d9b6df4c07c0378f27b87fd/lib/src/telegram/models/abstracts/message_origin.dart#L24C1-L24C1

HeySreelal commented 10 months ago

I'm sorry, this was left unimplemented.

HeySreelal commented 10 months ago

Updated it on v1.12.4, thanks for reporting.