Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

[January 2022] Avatars and Push v2

Pre-release
Pre-release
Compare
Choose a tag to compare
@COM8 COM8 released this 31 Dec 14:05
· 100 commits to master since this release

How hard could it be to add user avatars? How much time do I have to spend on it to get it working? Turns out a lot 😂. Initially my goal was to implement XEP-0084 User Avatar in two days (less than 16 hours over Christmas). The result was I spend 6 days (roughly 60 hours) on it.
There were a couple of issues I had to tackle since I wanted to have a robust and fully featured implementation of it. So first of all I had to find a way to scale images to a fixed size (500x500) and store them in a compressed format in the DB. After that I noticed images will fail to upload when they are too large , so I introduced a maximum size of one MiB per image. With all of that sorted out I had to make sure I always have the most recent image of a contact. Therefore I had to subscribe to the PEP node of the contact. Then there were a bunch of different edge cases I had to fix. But now UWPX supports user avatars 🎉.

Besides that I also updated to the latest Push Server protocol. This should result in a more reliable push message delivery. There are still a bunch of edge cases I have to sort out, for example what happens if a push message arrives, when the client is shutting down?

Please report bugs here!

Want more up to date news?

Follow @UWPX_APP on Twitter.

XMPP Office Hours

As a part of XMPP Office Hours I gave a talk about how UWPX was build and what it took me to do so.
The Video can be found on YouTube: https://youtu.be/fkq8Nvlw3LA

https://youtu.be/fkq8Nvlw3LA

Donations

Donate Donate

Known bugs

  • MUC subject changing leads to an account disconnect #34
  • ListDetailsView looses selection on reorder #166

Changes

  • Added XEP-0084 User Avatar support
  • Updated the push implementation to the latest Push Server protocol
  • Displaying the Group chat (MUC) name when available
  • Improved and refactored push message handling in the background task
  • More reliable push message handling
  • Improved the chat message hyperlink color
  • Updated progress bar and rings to WinUI 2.8
  • Moved the chat unread badge from the presence badge to the preview text line
  • Simplified Group chat MUC bookmarks management
  • Fixed chat settings MAM button
  • Fixed collection changed crash for MUC members
  • Fixed missing MUC affiliation check for configuration
  • Fixed removing a chat does not perform cascade deletion #151
  • Various fixes related to image inline downloads

Examples

This example shows how I retrieve the users avatar when he adds his account.
own_avatar

This example shows changing the avatar for an account.
chat_avatars_small

How can I get this App?

There are three ways how you can get access to the app.

1. Microsoft Store:

The simplest way is to just download it via the Microsoft Store.

2. Sideload:

If you don't want to use the Microsoft Store for getting access to UWPX you can also sideload a pre build app.
For this head over to releases and download the latest UWPX-Installer.exe.
Once downloaded, double click it and then click on install.

For this to work you first have to enable Sideload app in your Windows settings! Click here for more information about this.

⚠️ Windows will try to warn you that this is a malicious installation program. This is because I did not sign it with a valid developer certificate - you can ignore it. ⚠️

3. Build it by your own

Short version:
  1. Install Visual Studio 2022
  2. Clone the repository with Visual Studio 2022
  3. Build the project for your target platform (e.g. x64)
  4. Install the app on your target system:
    Here you can find more information about: How to install UWP apps, using the developer mode.
Long version:

An extended guide on how to build UWP with images to guide you through can be found here.