From 666198e27d6441328746b8138d529ff2838b0e9b Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Tue, 24 Dec 2024 16:57:28 -0800 Subject: [PATCH] drop old code block which will be replaced in the future --- src/pnut_matrix/appservice.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/pnut_matrix/appservice.py b/src/pnut_matrix/appservice.py index ca7b863..ea71808 100644 --- a/src/pnut_matrix/appservice.py +++ b/src/pnut_matrix/appservice.py @@ -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-')