summaryrefslogtreecommitdiffstats
path: root/lib/msgstore.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/msgstore.go')
-rw-r--r--lib/msgstore.go73
1 files changed, 73 insertions, 0 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index 7af9fd2..222c9fc 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -361,6 +361,79 @@ func (store *MessageStore) Answered(uids []uint32, answered bool,
}, cb)
}
+// NOTE(shivesh): my custom flags
+func (store *MessageStore) Important(uids []uint32, important bool,
+ cb func(msg types.WorkerMessage)) {
+
+ store.worker.PostAction(&types.ImportantMessages{
+ Important: important,
+ Uids: uids,
+ }, cb)
+}
+
+func (store *MessageStore) List(uids []uint32, list bool,
+ cb func(msg types.WorkerMessage)) {
+
+ store.worker.PostAction(&types.ListMessages{
+ List: list,
+ Uids: uids,
+ }, cb)
+}
+
+func (store *MessageStore) Food(uids []uint32, food bool,
+ cb func(msg types.WorkerMessage)) {
+
+ store.worker.PostAction(&types.FoodMessages{
+ Food: food,
+ Uids: uids,
+ }, cb)
+}
+
+func (store *MessageStore) Personal(uids []uint32, personal bool,
+ cb func(msg types.WorkerMessage)) {
+
+ store.worker.PostAction(&types.PersonalMessages{
+ Personal: personal,
+ Uids: uids,
+ }, cb)
+}
+
+func (store *MessageStore) Work(uids []uint32, work bool,
+ cb func(msg types.WorkerMessage)) {
+
+ store.worker.PostAction(&types.WorkMessages{
+ Work: work,
+ Uids: uids,
+ }, cb)
+}
+
+func (store *MessageStore) Physics(uids []uint32, physics bool,
+ cb func(msg types.WorkerMessage)) {
+
+ store.worker.PostAction(&types.PhysicsMessages{
+ Physics: physics,
+ Uids: uids,
+ }, cb)
+}
+
+func (store *MessageStore) Todo(uids []uint32, todo bool,
+ cb func(msg types.WorkerMessage)) {
+
+ store.worker.PostAction(&types.TodoMessages{
+ Todo: todo,
+ Uids: uids,
+ }, cb)
+}
+
+func (store *MessageStore) Later(uids []uint32, later bool,
+ cb func(msg types.WorkerMessage)) {
+
+ store.worker.PostAction(&types.LaterMessages{
+ Later: later,
+ Uids: uids,
+ }, cb)
+}
+
func (store *MessageStore) Uids() []uint32 {
if store.filter {
return store.results