GithubHelp home page GithubHelp logo

Personal threads about comm HOT 5 CLOSED

Ashoat avatar Ashoat commented on May 28, 2024
Personal threads

from comm.

Comments (5)

Ashoat avatar Ashoat commented on May 28, 2024

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.

palys-swm avatar palys-swm commented on May 28, 2024

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.

Ashoat avatar Ashoat commented on May 28, 2024

Two more small things I realized we should do:

  1. 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:
  2. I'd like to avoid converting squadbot's staffThreadID to PERSONAL. I commented this on D417. The ID of the thread is stored in lib/facts/bots.json

Besides that, we have @palys-swm's list from before his vacation:

  1. 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
  2. Migration script has to be updated
  3. 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
  4. 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:

  1. Exclude viewer from usersSearchResults in ChatThreadList.listDataSelector
  2. Order the search results in ChatThreadList: non-pending PERSONAL, 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.

Ashoat avatar Ashoat commented on May 28, 2024

Some more stuff:

  1. 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
  2. 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 be ThreadSettings. 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.

Ashoat avatar Ashoat commented on May 28, 2024

Here is a new list of what's left:

  1. "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)
  2. Migration script has to be updated (@palys-swm working on it)
    • Avoid converting staffThreadID to PERSONAL
  3. 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)
  4. Use PERSONAL threads in createSquadbotThread and createAccount (very easy)
  5. Buttons in ThreadSettings

from comm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.