drop old code block which will be replaced in the future

This commit is contained in:
Morgan McMillian 2024-12-24 16:57:28 -08:00
parent a5695069bc
commit 666198e27d

View file

@ -257,29 +257,6 @@ async def new_message(event, user):
)
bridge_event.save()
# TODO: need to redo this for global message
# if user is not None:
# cctag = re.search('##$', text)
# if cctag:
# raw = []
# cname = get_channel_settings(room.pnut_chan)['name']
# text = text[:-2]
# ftext = '\n\n[' + cname + "](https://patter.chat/room.html?channel=" + str(room.pnut_chan) + ")"
# mtext = textwrap.wrap(text + ftext, 254)
# if len(mtext) > 1:
# longpost = {
# 'title': "",
# 'body': text,
# 'tstamp': time.time() * 1000
# }
# pretext = textwrap.wrap(text, 100)
# text = pretext[0]
# text += "... - https://longpo.st/p/{object_id} - #longpost"
# raw.append({'type':"nl.chimpnut.blog.post", 'value': longpost})
#
# text += ftext
# r, meta = pnutpy.api.create_post(data={'text': text, 'raw': raw})
except pnutpy.errors.PnutAuthAPIException:
if room.pnut_chan != 0:
logging.exception('-unable to post to pnut channel-')