Skip to content
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

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from
Open

send history in MUCs #227

wants to merge 15 commits into from

Conversation

uhoreg
Copy link
Member

@uhoreg uhoreg commented Jan 26, 2021

No description provided.

Copy link
Contributor

@jaller94 jaller94 left a 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.

src/xmppjs/HistoryManager.ts Outdated Show resolved Hide resolved
src/xmppjs/HistoryManager.ts Outdated Show resolved Hide resolved
src/xmppjs/HistoryManager.ts Outdated Show resolved Hide resolved
src/xmppjs/HistoryManager.ts Outdated Show resolved Hide resolved
src/xmppjs/HistoryManager.ts Show resolved Hide resolved
@uhoreg uhoreg requested a review from a team January 29, 2021 03:23
@uhoreg
Copy link
Member Author

uhoreg commented Jan 29, 2021

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?

@jaller94 jaller94 self-requested a review February 3, 2021 14:00
@jaller94 jaller94 self-assigned this Feb 3, 2021
Copy link
Contributor

@jaller94 jaller94 left a 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;
Copy link
Contributor

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?

Copy link
Member Author

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>

Comment on lines +61 to +62
// TODO: make a class that stores in PostgreSQL so that we don't lose history
// when we restart
Copy link
Contributor

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?

Copy link
Member Author

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.

src/xmppjs/HistoryManager.ts Show resolved Hide resolved
src/xmppjs/HistoryManager.ts Outdated Show resolved Hide resolved
src/xmppjs/HistoryManager.ts Outdated Show resolved Hide resolved
src/xmppjs/HistoryManager.ts Show resolved Hide resolved
src/xmppjs/HistoryManager.ts Show resolved Hide resolved
src/xmppjs/XJSGateway.ts Outdated Show resolved Hide resolved
src/xmppjs/XJSGateway.ts Outdated Show resolved Hide resolved
uhoreg and others added 4 commits February 4, 2021 14:40
@uhoreg uhoreg marked this pull request as ready for review February 4, 2021 21:17
@uhoreg uhoreg requested a review from jaller94 February 4, 2021 21:17
Copy link
Collaborator

@Half-Shot Half-Shot left a 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

Copy link
Collaborator

@Half-Shot Half-Shot left a 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.

src/xmppjs/XJSGateway.ts Show resolved Hide resolved
@jaller94 jaller94 removed their assignment Mar 9, 2021
@emorrp1
Copy link

emorrp1 commented Sep 29, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants