Comments (5)
We'll need to rename threadIsPersonalChat
when we start working on this feature. (That function right now just detects if it is a single-person thread.)
from comm.
https://phabricator.ashoat.com/D328#inline-1359
I'm realizing we have a similar condition here. I don't think we should handle it in the same way, since it shouldn't be possible to change type to or from threadTypes.PERSONAL, and it shouldn't be possible to set parentThreadID for a threadTypes.PERSONAL.
I think we need some more validation:
It shouldn't be possible to set parentThreadID for threadTypes.PERSONAL in createThread
It shouldn't be possible to set parentThreadID for threadTypes.PERSONAL in updateThread
It shouldn't be possible to change type to threadTypes.PERSONAL in updateThread
It shouldn't be possible to change type from threadTypes.PERSONAL in updateThread
from comm.
Two more small things I realized we should do:
- For the two-person threads we programmatically create on the server, we should switch the code to make sure these are
PERSONAL
threads going forward. Two places I know of:createSquadbotThread
createAccount
, specifically the thread that gets created with me (but not the private single-person one)
- I'd like to avoid converting squadbot's
staffThreadID
toPERSONAL
. I commented this on D417. The ID of the thread is stored inlib/facts/bots.json
Besides that, we have @palys-swm's list from before his vacation:
- Sending a message in a pending thread results in anonymous user name. I debugged it a bit, and it looks like new relationship row is created correctly but is not visible on the frontend
- Migration script has to be updated
- One corner case bug: when a user opens a pending thread and blocks the user, it's still possible to send a message. It fails on the backend, but we should not allow even typing it
- It's possible to left a personal thread. We should block that and it requires introducing a new permission
@KatPo is almost done with 4, and is working on 3. @palys-swm already has a diff out for 2.
We also have some follow-ups from D373:
- Exclude viewer from
usersSearchResults
inChatThreadList.listDataSelector
- Order the search results in
ChatThreadList
: non-pendingPERSONAL
, then the rest, then pending threads
And finally, there's the "master list" at the top of this issue. I read through that and I think most of it is handled, but would be great if @palys-swm can take a look too. One thing I thought of is that it is still possible for a user to create a two-person non-PERSONAL
thread through ComposeThread
, which might be a bit confusing. But I think we can scope this work under #118.
from comm.
Some more stuff:
- I requested changes on D327 to make sure we use the same color we already generated in the search results when we save the thread. Should be an easy change
- I'd like to add buttons to
ThreadSettings
for a personal thread. If somebody gets a request from a spammy user, I think the first place they'll think to check for a block button would beThreadSettings
. They probably won't think to go to the More tab. While we're adding a block button, we might as well add friend/unfriend/block/accept request/reject request buttons.
I looked into doing 2 myself but I realized I would end up depending on too much of the current uncommitted work @palys-swm has out. In particular, I wanted a way to extract the other user ID out of a PERSONAL
ThreadInfo
, but noticed this is already implemented in some of the active diffs, for instance usersWithPersonalThreadSelector
in D373. EDIT: I guess it's also in threadIsWithBlockedUserOnly
, which is already committed. Maybe we should extract this logic?
@palys-swm, maybe you can take a look once you finish the current stuff?
from comm.
Here is a new list of what's left:
- "Sending a message in a pending thread results in anonymous user name. I debugged it a bit, and it looks like new relationship row is created correctly but is not visible on the frontend" (reported by @palys-swm)
- Migration script has to be updated (@palys-swm working on it)
- Avoid converting
staffThreadID
toPERSONAL
- Avoid converting
- One corner case bug: when a user opens a pending thread and blocks the user, it's still possible to send a message. It fails on the backend, but we should not allow even typing it (@KatPo working on it)
- Use
PERSONAL
threads increateSquadbotThread
andcreateAccount
(very easy) - Buttons in
ThreadSettings
from comm.
Related Issues (20)
- Make it possible to see history of threads you have left
- Prevent blocked users from messaging each other HOT 6
- Redesign friend/block list
- Replace ComposeThread HOT 8
- Private thread
- Security Issue: Request for contact HOT 1
- Improve search results view
- Deal with iOS 14's limited photo library permissions HOT 1
- Redesign calendar HOT 1
- Support native share dialogs
- Replies for non-text messages
- Update robotext message when thread type is changed HOT 2
- Handling multiline select on web
- Sidebar inline replies number HOT 2
- Header oscillates when opening emojis on keyboard HOT 1
- Thing
- pod install fails with use_expo_modules!
- xcode ios: failed to run custom build command for `native_rust_library v0.1.0` HOT 12
- please stop paging me with @ mentions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from comm.