The channel id can be fetched using the "About" entry in the dropdown menu.
At the SQL query level, list the posts posted by a given incoming webhook
(psql) # \x on
# SELECT p.*
FROM Posts p
JOIN Channels c ON p.channelid=c.id
JOIN Teams t ON p.teamid=t.id
WHERE t.displayname='teamname_at_topleft'
AND c.displayname='channelname_at_topmiddle'
AND props LIKE '%"from_webhook":"true"%'
AND props LIKE '%"override_username":"lowercasehookname"%';
After checking what it yielded, you can use that as a subquery:
DELETE FROM Posts WHERE id IN (SELECT p.id FROM .....)
you may tweak the query if you want to target a given userid.
It doesn't handle/fix posts whose parentid point to one of the deleted posts.and thread membership
The channel id can be fetched using the "About" entry in the dropdown menu.
At the SQL query level, list the posts posted by a given incoming webhook
(psql) # \x on
# SELECT p.*
FROM Posts p
JOIN Channels c ON p.channelid=c.id
JOIN Teams t ON p.teamid=t.id
WHERE t.displayname='teamname_at_topleft'
AND c.displayname='channelname_at_topmiddle'
AND props LIKE '%"from_webhook":"true"%'
AND props LIKE '%"override_username":"lowercasehookname"%';
After checking what it yielded, you can use that as a subquery:
DELETE FROM Posts WHERE id IN (SELECT p.id FROM .....)
you may tweak the query if you want to target a given userid.
It doesn't handle/fix posts whose parentid point to one of the deleted posts.and thread membership