Skip to content

v2.2.0 - Support Link and Image Preview + Fix embed deserialization

Latest
Compare
Choose a tag to compare
@TehGM TehGM released this 19 Feb 09:39
8e84a3f

Release info

Recently a version 2.1.5 added support for group preview embeds. Unfortunately that version also introduced a severe bug that caused deserialization of any message containing an embed to fail. Version 2.2.0 finally fixes this problem, and version 2.1.5 will be marked as deprecated.

Additionally, support was added for link and image preview embeds. These embeds will automatically be enabled for you, unless you opt out using ChatMessageSendingOptions. Of course, you can also add new or override existing embed implementations using a new deserializer.

This release also contains other minor improvements, such as resolving a couple of warnings, or improving performance by removing a few unnecessary locks.

Changes

  • Added: IChatEmbedDeserializer to allow deserialization of chat embeds.
  • Added: support for Link and Image preview embeds through LinkPreviewChatEmbed and ImagePreviewChatEmbed respectively.
  • Added: ChatMessageSendingOptions provide 2 predefined statics: DisableEmbeds and DisableLinkDetection.
  • Change: Chat Messages and retrieved chat histories will now have Embeds property properly populated.
  • Change: UrlMetadataMessage now uses headers with version 2.
  • Change: ChatMessageSerializer now has a constructor that takes a IChatEmbedDeserializer.
  • Change: ChatHistoryResponseSerializer now has a constructor that takes a IChatEmbedDeserializer.
  • Change: Removed unnecessary locks in CommandsSystem, MessageSerializerProvider and ResponseSerializerProvider.
  • Fix: an error when a message containing an embed is received.
  • Fix: warnings logged due to link metadata message not having a serializer registered with the provider.

Obsoletions:

  • BuildDefaultServiceProvider method in WolfClient is now obsolete - the constructors that use this method have been obsolete since v2.0.0. Both the constructors and the method will be removed in a future release.
  • BuildDefaultServiceProvider method in CommandsSystem is now obsolete - the constructors that use this method have been obsolete since v2.0.0. Both the constructors and the method will be removed in a future release.

Package URL

Main meta-package - NuGet.org
Wolfringo.Hosting - NuGet.org