You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.
Norton Wang edited this page Sep 7, 2021
·
1 revision
Goal
Build an open messaging canister that can be integrated in different frontends, eg. Plug, Stoic, OpenChat, DSCVR. The data format should be structured but extensible.
Specification
The initial prototype can be a single canister. Increased canister storage will enable this to scale without too much extra effort.
Example interface:
public type Data = {
id: ?Nat;
recipient: Principal;
sender: Principal;
title: Text;
data: Blob;
};
public type MessagingService = actor {
// Deliver a message from caller to recipient
send : shared (Data) -> async ();
// Retrieve all messages for caller
getAll : shared () -> async [Data];
// Delete messages by id for caller
remove : shared ([Nat]) -> async ();
};
Notes
Need to prevent spam - perhaps use proof-of-work from II
Extending the data model with an isRead flag to enable a "mark as read" feature could be useful