Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

add roomnick SlashCommand #2689

Merged
merged 3 commits into from
Feb 26, 2019
Merged

add roomnick SlashCommand #2689

merged 3 commits into from
Feb 26, 2019

Conversation

t3chguy
Copy link
Member

@t3chguy t3chguy commented Feb 24, 2019

Partial fix for https://github.com/vector-im/riot-web/issues/2458

image

Signed-off-by: Michael Telatynski 7t3chguy@gmail.com

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@t3chguy t3chguy requested a review from a team February 24, 2019 01:39
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise lgtm

const cli = MatrixClientPeg.get();
const ev = cli.getRoom(roomId).currentState.getStateEvents('m.room.member', cli.getUserId());
const content = {
...ev ? ev.getContent() : null,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getContent() will always return an object, however ev may be null (because cache problems) - we should null guard that

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what that ternary is doing though, no?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, yup, that's a thing.

There is the scenario where we'd end up sending an event without a membership key though - it should probably always be set to 'join'.

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@t3chguy t3chguy assigned turt2live and unassigned t3chguy Feb 25, 2019
@turt2live turt2live merged commit 28805da into develop Feb 26, 2019
@t3chguy t3chguy deleted the t3chguy/roomnick branch May 25, 2020 18:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants