-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbacklog.txt
180 lines (138 loc) · 8.38 KB
/
backlog.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<Planned>
• currently askingTimeOfDay_from and _to are being saved in GMT by converting from client time to the server time (GMT)
Instead, I have to save the time in client's time, and wrap getters of these settings in converting it from client time to the server time (GMT).
This way change to daylight savings time will automatically be accounted for, without rewriting to each client's Chat document.
• change matchTrees.inverse test to works not for all the Commands, but only within States.
• make addQuestion support telegram markdown and links
To figure out formatting in the message for question text see "entities": "hashtag", "bold", "italic", "text_link", "code", "underline", "strikethrough"
• if a questionText contains links, set a field in the question document: `"hasAttachments": true`, so that if a question has this field, when listing questions, this question will always be listed in a separate message.
• Enrich turnQuestionsOnOff and turnTagsOnOff Commands matchTrees to support:
- «enable all #lorem questions» (enabled all questions with tag #lorem)
- «don't ask me questions not tagged with #lorem» (disabled all tags except #lorem)
- «don't ask me untagged questions» (disables all untagged questions)
• Add support for complex query logic for questionsQuery (and tagsQuery)
• Implement automatic questions asking with node-cron functionality
• implement searchQuestions and searchTags (maybe just use .execute methods of listQuestions and listTags for them)
When not using any quotes, search by words as separate terms. When using quotes, search by exact inclusion of (trimmed) text within the quotes.
• With the new questionsQuery flag ('havingTagsEnabled'), add the following possibilities for the listQuestions matchTree:
- lists all questions that are both enabled by question and by all of its tags:
- «list questions that are fully enabled»
- lists all questions that are disabled only by tags:
- «list questions that are disabled by tags»
- «list questions some of which tags are disabled»
- «list questions that are enabled but disabled by tags»
- «list enabled questions that are disabled by tags»
- lists all questions that are disabled in any way (either by question or by its tags):
- «list questions that won't be asked»
- «list questions that I won't be asked»
- «list questions that you are not going to ask me»
- «list questions that are disabled either by tags or by question»
• When querying questions, make an option to specify several tags with logical "AND"
E.g.
- «list questions that tagged both #tag1 and #tag2»
For this, I want to make questionsQuery support complex query logic
in a way that mongoDB aggregation works: $match, $and, $or operators.
So that it can be further extended to support such queries:
- «list questions that are turned on and have either #tag1 and #tag2 or #tag4»
- «list enabled questions that contain either both "backend" and "javascript" or "nodejs"»
• «show any question» should work
• Add data encryption for user data
• add "fallback" Command for each State.
The command's intent is to check if some of the key words that are used in other Commmnads in the State, and make the bot respond with something like:
<< Sorry, I don't get what do you want me to "tag". Try something simpler.
You can ask me to:
add specific tags to specific questions by id
remove specific tags from specific questions by id
...
>>
or
<< Sorry, do you ask me to "delete" something or to "add" something? I don't get it. Try something simpler.
You can ask me to:
add specific tags to specific questions by id
remove specific tags from specific questions by id
...
>>
• correct description and comments for the Command class (core/Command/Command.ts)
• showSetting Command for messages:
- «tell me when will you ask me next question»
- «tell me what time of day do you ask me»
- «tell me what time of day are you interviewing me»
- «tell me what time of day you can ask me questions»
- «tell me what time do you finish ask me any questions»
- «tell me what time do you start ask me questions»
- «tell me what time do you start interviewing me»
• improve askMeAQuestion when asked to ask a question by tag:
Don't require that tag to be enabled for queried questions. Only require all other tags for the questions have to be enabled.
• extend listQuestions and listTags Commands functionality to support querying quantity:
- «tell me how many questions do we have»
- «show me how many enabled tags do we have»
- «count me how many enabled tags do we have»
- «calculate me how many enabled tags do we have»
• turnTagsOnOff, turnQuestionsOnOff, addTagsToQuestions, removeTagsFromQuestions Commands' display methods wierdly have way too much in common. Consider DRYing it out to some abstraction.
• automatically count number of questions with a tag and save the amount to the field in Tag document, so that:
1. Number of questions that have the tag is available at hand
2. When number becames 0, Tag document can be deleted, or at least won't be showed when asked to list all tags
• add 'hey' Command.
It should accept requests like:
- «hey»
- «hi»
and repond:
- «hey»
• add Command for changing Timezone:
It should react on something like:
- «change the timezone» - change to askTimezone command
- «change the timezone to us» - react, then try to parse the message after the matchTree, if parsed successfully, either set a timezone or add several candidates while switching to the askingTimezone state.
<Optional>
• Tests
- sheet methods
- addTagsToQuestions
- removeTagsFromQuestions
- turnQuestionsOnOff
- getTags
- turnTagsOnOff
- getQuestions (only additional questionsQuery Tags flags)
- getTagDocById
- getTagDocByStr
- askForQuestionText
- finishAddingQuestionText
- getAwaitingQuestionTags
- askConfirmation
- (maybe) executeMethod
- matchTree
- confirm
- submitQuestionText
• Extend listTags Command functionality to support querying by qids
• Extend functionality of turnQuestionsOnOff tree, allowing more complex requests
E.g.:
- «turn all #web questions off»
- «enable all questions from tag #web»
• Extend matchTree and functionality of turnTagsOnOff:
- «ask me only #web questions»
• Add support for adding other (attached) objects to Question (images, voice, files)
This may require storing this data in the database and reuploading it to Telegram when asking a question
• questionsQuery: add support for specifying qid range
E.g.:
- «list questions 3-6»
- «show me questions from 3 to 6»
• Add a "revert last action" command.
For this, i'll have to save data about last executed command in the database, including contents of Questions and etc. to be able to restore it after edition or deletion.
• optimize mongodb queries in sheet methods
e.g.:
deleteQuestions:
` db.chats.update({"chatId":231079996},{"$pull":{"Questions":{"qid": 34 }}}); `
run this in mongo shell, and it will remove question #34 from that chat
• currently bot memorizes all tags as lowercase. Consider changing it to like they did with emails, i.e. case-insensitive, except it memorizes the case with the first time.
• improve setAskingTime Command so that it recognises:
- «every *timeunit*» (as to be equivalent to «every 1 *timeunit*»)
- «ask me questions twice a day»
- «ask me questions 4 times a day»
- «ask me questions every other day»
- «ask me questions every minute»
- «ask me questions every hour»
Currently:
It didn't understand "ask me questions twice a day", but it understands "ask me questions every 12 hours".
It didn't understand "ask me questions every other day", but it understands "ask me questions every 2 days".
It didn't understand "ask me questions every hour", but it understands "ask me questions every 1 hour".
Now there's a so-so fix for most of these cases.
• abstract out the terminology of Interpretation/textProcessing/parseTimezone to one or more functions the do the same search/parsing but against arbitrary arrays.
Then define parseTimezone function in terms of those functions.