Another short week after spending some time curing my flu. I could still make some progress with WhatsApp integration, but it needs quite a bit of work before it can be used.
Functionality
Gmail Plugin
I have separated the logic that reached out to google (the API) into a separate class, called GMailClient
. This class can not handle generic error cases, like expired authentications.
As handling expired authentication, I came to the conclusion that historyId
is bound to your session in Google. When the user re-authenticates, the historyId
must be reset. Unfortunately, if we reset it, we can't pick up the changes since the last login. For now, I'm just fetching the last 20 emails, but I don't think it's the right solution.
- 🪲 Re-authenticating Gmail will not be able to pick up the changes since last sync (history id is invalid). We need to find a way to sync the emails since.
I have spent most of my time on WhatsApp Plugin. I managed to put Baileys into the project and set up QR code pairing (multi device auth). I'm receiving the messages, but those are only printed in the terminal. There are also contact updates that are put into the database now. These contacts are going to be needed for defining Resource filters.
The next step is to have proper history items and to make it possible to send messages.
As part of the WhatsApp Plugin, I have done some clean-up work. I have reworked the Settings page that can no load the plugins dynamically. I have also reworked a bit the Contacts page that now can load more items and the contacts can be filtered, though this filtering needs significant improvement.
Tasks for the future:
- Messages in History
- Resource creation
- Filtering
- Handling deleted messages
- Handling message changes
- Read state
- Write message
- Make composer text/plain compatible
- Send message via WhatsApp
What was finished
- ✅ Gmail plugin: Common error handling / reauthentication
- ✅ WhatsApp plugin: Library setup
- ✅ WhatsApp plugin: QR code pairing
- ✅ WhatsApp plugin: Store WhatsApp contacts in
Contact
table - ✅ Improved Settings page
- ✅ Improved Contacts page
Backlog
- 🪲 Old Gmail integration - where
historyId
might be off (deleted?) is returning 404 - Postponed because I can't reproduce it. - Release the application and make it available on the website.
- UI update
- Make menubar small(er)
- Apply Contexty colours on the app
- Add Contexty icon
- Make history filter small
- Add icons to menus
- Create easy to access menus (always visible icons)
- Make Resource sidebar disappear and only show by clicking a menu item.
- Favourite menu items and filter based on them
- Filter items based by Label
- Display Participants of the Activity
- Contacts
- Sync Google contacts into Contexty
- Add the content of the original message as quoted text to the composer.
- 👾 i18n support
- 🪲 Switching Activity should scroll to the end (or first unread(?))
- Keyboard shortcuts
- Add Recipient(s) to the HistoryItem - The recipients are currently not saved on the History Item. 🙈