Chat and contact commands that reach the server through app-state sync.
Each command picks the patch that describes the change and hands it to the
session, then reports success as :ok instead of leaking the hash state the
transport returns.
This is orchestration, not actor work: nothing here touches the session
process state, which is why it lives outside ExWapp.Session.Worker.
Summary
Functions
Archives a chat, synchronising the change to the other devices.
Creates or updates a contact, synchronising the change to the other devices.
Deletes a chat, synchronising the change to the other devices.
Deletes a contact, synchronising the change to the other devices.
Unarchives a chat, synchronising the change to the other devices.
Types
@type result() :: :ok | {:error, term()}
Functions
@spec archive_chat(GenServer.server(), String.t()) :: result()
Archives a chat, synchronising the change to the other devices.
@spec create_contact(GenServer.server(), String.t(), String.t()) :: result()
Creates or updates a contact, synchronising the change to the other devices.
@spec delete_chat(GenServer.server(), String.t()) :: result()
Deletes a chat, synchronising the change to the other devices.
@spec delete_contact(GenServer.server(), String.t()) :: result()
Deletes a contact, synchronising the change to the other devices.
@spec unarchive_chat(GenServer.server(), String.t()) :: result()
Unarchives a chat, synchronising the change to the other devices.