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

1.0.0 #307

Closed
wants to merge 196 commits into from
Closed

1.0.0 #307

wants to merge 196 commits into from

Conversation

bates64
Copy link
Collaborator

@bates64 bates64 commented May 4, 2018

Ready to merge as soon as https://github.com/decent-chat/decent/projects/7 is fully complete :)

Resolves #115
Fixes #234
Fixes #261
Fixes #276
Fixes #281
Fixes #305

const str = storage.getItem(key)
const value = str ? JSON.parse(str) : defaultValue

console.log(`Storage: loaded ${key} =`, value)
Copy link
Member

@towerofnix towerofnix May 6, 2018

Choose a reason for hiding this comment

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

Don't keep these logs in the final 1.0.0!

const { channel } = request[middleware.vars]
}
])
*/
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

um

Copy link
Member

Choose a reason for hiding this comment

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

WIP, of course.

} catch (error) {
t.is(error.code, 'NOT_ALLOWED')
t.is(error.missingPermission, 'sendSystemMessages')
}
Copy link
Member

Choose a reason for hiding this comment

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

@heyitsmeuralex You still need to update serialize.message, and you should update test/serialize.js too.

Copy link
Member

@towerofnix towerofnix left a comment

Choose a reason for hiding this comment

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

Just a nit and a question re: flair test. System messages look good otherwise!

authorAvatarURL: emailToAvatarURL(m.authorEmail || m.authorID),
authorUsername: m.type === 'system' ? null : m.authorUsername,
authorID: m.type === 'system' ? null : m.authorID,
authorAvatarURL: m.type === 'system' ? null : emailToAvatarURL(m.authorEmail || m.authorID),
Copy link
Member

Choose a reason for hiding this comment

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

You should probably be doing these the other way around -- m.type === 'user' ? m.authorUsername : null, etc.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If we ever add more types they'll likely be tied to users too - system is the special case, not user.

t.is(serialized.id, '123')
t.is(serialized.authorUsername, 'jen')
t.is(serialized.authorID, '234')
t.is(serialized.authorFlair, 'spooks')
Copy link
Member

Choose a reason for hiding this comment

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

Hm, okay. Now I'm honestly surprised - was this test broken? It was passing, but it seems like t.deepEqual should have failed, since serialize.message doesn't have anything to handle authorFlair.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I removed authorFlair in the previous commit and forgot to test serialization - I don't think it was a broken test :)

Copy link
Member

Choose a reason for hiding this comment

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

Ah, okay! Sounds good.

@bates64 bates64 closed this Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Affects the @decent/client package. server Affects the @decent/server package. wip Work-in-progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants