cabal-club / cabal-core

Core database and replication for cabal.
GNU Affero General Public License v3.0
303 stars 43 forks source link

emit flag event when new moderation event indexed #92

Closed cblgh closed 4 years ago

cblgh commented 4 years ago

the event we're getting from materialized-group-auth is missing a lot of information.

the event flag-event basically reduces the amount of contortions consumers of the moderation api need to do to present actions properly in their interfaces.

the event that is emitted has the following information:

{ by:
   '2a0980a46d193418936e13a33c4bd1cb66b745e7c00246b8ee7dbd0b10a1dc8e',
  keyseq:
   '2a0980a46d193418936e13a33c4bd1cb66b745e7c00246b8ee7dbd0b10a1dc8e@12',
  id:
   '9875a983d8a088b9fe62750e86a9d514c47057373fc8827f6096b431927a070c',
  channel: '@',
  type: 'add',
  flags: [ 'hide' ],
  reason: '' 
}
cblgh commented 4 years ago

missed a property emitted by materialized group auth, so this is basically unneeded

(the update event emits a keyseq under the name of keq)