-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
send history in MUCs #227
base: develop
Are you sure you want to change the base?
send history in MUCs #227
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to see history support in MUCs being worked on. 👏
Here are some minor notes, because you asked for a quick review.
We should only send room history when the room's history visibility settings allow users to see history. What is the best way to get the room's history settings? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HistoryManager class would be a good one to have tests for.
In general, I think this PR is already pretty good.
Please remove the Draft state if you're looking for an Approve or Request changes review.
*/ | ||
interface IHistoryStorage { | ||
// add a message to the history of a given room | ||
addMessage: (chatName: string, message: Element, jid: JID) => unknown; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why allow unknown
to be returned and not just void
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it could be async and return Promise<void>
// TODO: make a class that stores in PostgreSQL so that we don't lose history | ||
// when we restart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to file that as an issue or address this before merging this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably just file as an issue.
Co-authored-by: Christian Paul <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks worthy of a go to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just occurred to me that we should respect history vis.
hi, can this be merged now? it seems the requested changes have been resolved and the reviewer removed themselves. This would mitigate the downsides of missing #64 |
No description provided.