Opened 5 years ago

Last modified 4 years ago

#963 in_progress enhancement

to/cc/bto/bcc not supported on activities

Reported by: Jessica Tallon Owned by: Jessica Tallon
Priority: major Milestone: 1.0
Component: programming Keywords: federation, activities
Cc: JanKusanagi Parent Tickets:

Description

As of #905 we now have activities in GMG. Activities however should have 4 extra fields which they currently do not have. These should specify who the activity goes to.

The fields are to/cc/bto/bcc. In these fields they can take Lists which need to be created. Lists can be user defined or a special type which are:

  • Public (everyone including those not logged in)
  • Following (those who are following the user posting)
  • Followers (those who the user posting is following)

The concept of following a user currently doesn't exist in MediaGoblin however for this issue such a spcialised list should exist so that we can record who the user wants to show the media to but currently just be an empty list of users.

Discussions with Chris and Elrond about implementing this as it's a many to many for two types would be to have a Reciever model which User and List inherit from. The id would be on reciever and then you would have a foreignkey to the reciever

e.g.

class Reciever(Base):
    """ Model which represents person(s) who might recieve something """
    __tablename__ = "core__recievers"

    id = Column(Integer, primary_key=True)

class User(Reciever, UserMixin):
    # This would be the existing user model without the id as that's been moved to reciever.
    pass

class List(Reciever):
    # This would the representation of a List
    pass

I'm unsure how the special cases should be represented.

Subtickets

Change History (6)

comment:1 Changed 5 years ago by JanKusanagi

Cc: JanKusanagi added

For the record, this is reversed:

  • Following (those who are following the user posting)
  • Followers (those who the user posting is following)

'Following' is the list of people the user is following.
'Followers' is the list of people who follow the user.

Also, Pump.io's webUI doesn't offer "Following" as a recipient (it'd make it easy to spam people who isn't following you), though another client could potentially use it (not sure if the server would distribute to it).

comment:2 Changed 4 years ago by Jessica Tallon

Owner: set to Jessica Tallon
Status: newin_progress

comment:3 Changed 4 years ago by Jessica Tallon

I shall have to investigate what pump.io does when "Following" is specified through the API.

comment:4 Changed 4 years ago by Jessica Tallon

I have largely done this, I have the changes needed on the models and mixins to have audience targeting. This just needs the migration I wrote to be fixed to work on SQLite, not sure how best to do that on alembic, maybe our old tooling will work.

I'm still actively working on this, hope to get it merged soon.

comment:5 Changed 4 years ago by Jessica Tallon

Milestone: 0.9.0

comment:6 Changed 4 years ago by Christopher Allan Webber

Milestone: 0.9.01.0
Note: See TracTickets for help on using tickets.