AiursoftWeb / Kahla.App

Kahla is a cross-platform business messaging app.
https://www.kahla.app
MIT License
415 stars 85 forks source link

Connect to the new API changes #834

Closed Anduin2017 closed 4 years ago

Anduin2017 commented 4 years ago

https://github.com/AiursoftWeb/Kahla/pull/167

To solve this issue, we need to modify the Kahla.App code to respect the new event logic.

Anduin2017 commented 4 years ago

NewFriendRequest event will directly return the Request object.

This is helping the app to sync the friend requests locally.

Anduin2017 commented 4 years ago

Refactored event FriendAcceptedEvent, renamed to FriendsChangedEvent. It will be triggered when any of your associated friend requests change, whether you sent it to you, whether it was approved or rejected

This is helping the app to create a new conversation when friend requests completed.

Anduin2017 commented 4 years ago

The conversation/all API will return the entity of the last message in this conversation and will carry the sender information.

This is helping the app to sync the latest message so it can sync more messages based on WebSocket API without calling get messages.

Anduin2017 commented 4 years ago

Refactored WereDeletedEvent and renamed it to FriendDeletedEvent. The deleted conversation ID will now be returned. And both the trigger person and the deleted person will push.

This is helping the app to delete the local conversation.

Anduin2017 commented 4 years ago

Added event type GroupJoinedEvent. Triggered when you join a group, it will return a createdConversation, a messageCount, a latestMessage.

This is helping the app to create the local conversation when you joined a group even on another device.

Anduin2017 commented 4 years ago

So, shall we close this? @hv0905

hv0905 commented 4 years ago

ok