Signed-off-by: oppiliappan me@oppi.li
Monorepo for Tangled
tangled.org
appview/notify: use sets to manage participant list #874
merged
opened by
expand 1 commit
hide 1 commit
appview/notify: use sets to manage participant list
Signed-off-by: oppiliappan <me@oppi.li>
there are a couple more usecases for sets that i can think of already across the codebase!
(this also fixes the bug where user who is a participant + mentioned would result in a double notification)
As a seasoned Go writer (I jest) who has never needed this abstraction before, I'm inclined towards a map[T]struct{} but if we're using this elsewhere, then no biggie. @oppi.li thoughts on just vendoring/in-tree'ing this code? Could have a subpackage somewhere…
yes, lets move it into the tree! although i don't expect the library to change much.
expand 1 commit
hide 1 commit
appview/notify: use sets to manage participant list
Signed-off-by: oppiliappan <me@oppi.li>
pull request successfully merged
I think
map[T]struct{}is just fine, but I do see the values of this abstraction.recipients.Remove(actorDid)seems pretty cool tbh.How do you think @anirudh.fi ?