btimby / nimtok

IPFS / Nimiq messaging
MIT License
3 stars 0 forks source link

Implement posting. #3

Open btimby opened 3 years ago

btimby commented 3 years ago

I have a beginning in the Publish component and posts Vuex store.

https://github.com/btimby/nimtok/blob/main/src/components/Publish.vue https://github.com/btimby/nimtok/blob/main/src/store/modules/posts.js

The jist is the a user should be able to add a new message to their posts database. The Publish component should extract hashtags and mentions (@) from the body as the user types (allowing them to optionally choose known values).

Once placed into the user's posts database, it is accessible to any other users following this user. Furthermore, when following someone, their posts database can be observed using db.events.on('replicated') this even fires whenever a database is modified.

There needs to be a global / shared pubsub topic to track hash tags, each client will subscribe to this and keep a local count of hashtags to use to render "trending" tags.

Also, each client has a private pubsub topic for receiving message specific to them. Mentions can be delivered here to notify users if they are mentioned (this is separate from follower notification).