decent-chat / decent

Open source messaging platform for the modern web
https://meta.decent.chat
GNU General Public License v3.0
21 stars 5 forks source link

Add more characters to valid name spec #183

Open bates64 opened 6 years ago

bates64 commented 6 years ago

Names may consist only of alphanumeric characters, underscores (_), and dashes (-).

@towerofnix: opinions pls

towerofnix commented 6 years ago

Yeah, these would be cool. Min/max length is pretty easy to implement as a server setting (a little more effort to make it settable through the client).

towerofnix commented 6 years ago

Would be really cool to see a server config option to allow non-unique channel names. This'd be greatly useful for creating Decent-backed games, for example a per-user unique #inventory channel.

OHH YES,

PullJosh commented 6 years ago

Could you elaborate on the non-unique channel names thing? I'm confused. :stuck_out_tongue:

towerofnix commented 6 years ago

Basically, let multiple channels have the same name. (Internally, these channels would still have different IDs, of course.) This is handy for anybody who wants to create a bot user which runs a game. I guess you never saw dientendre/_v, two Discord-based games we were working on a while ago? (Also, if we ever do channel groups or whatever, handy then too.)

bates64 commented 6 years ago

Would be nice if emotes supported any character except : - I'll do that now. At the moment, you can't call an emote :+1:!

bates64 commented 6 years ago

Would be really cool to see a server config option to allow non-unique channel names. This'd be greatly useful for creating Decent-backed games, for example a per-user unique #inventory channel.

Iteration of this: a { requireUnique: true } default on POST /api/channels. Only admins can create channels, so we don't really need to worry about the security of this.

How would we handle nonunique channel names in references?